Index Page
cspice_wnextd
A  B  C  D  E  F  G  H  I  J  K  L  M  N  O  P  Q  R  S  T  U  V  W  X 

Abstract
I/O
Examples
Particulars
Required Reading
Version
Index_Entries

Abstract


   CSPICE_WNEXTD extracts the left or right endpoints from
   a double precision window.

I/O


   Given:

      side     indicating whether to extract the left or right endpoints of
               the intervals in 'window'

               [1,m] = size(side); char = class(side)

                 'L', 'l'       Left endpoints.
                 'R', 'r'       Right endpoints.

      window   SPICE window containing zero or more intervals.

               [2n,1] = size(window); double = class(window)

   the call:

      window_f = cspice_wnextd( side, window)

   returns:

      window   SPICE window containing zero or more intervals, representing
               the collection of singleton intervals containing either the
               left or the right endpoints of the intervals in the original
               'window'

               [2n,1] = size(window); double = class(window)

Examples


   Any numerical results shown for this example may differ between
   platforms as the results depend on the SPICE kernels used as input
   and the machine specific arithmetic implementation.

      %
      % Let 'window' contain the intervals
      %
      window = [ [ 1; 3 ]; [ 7; 11 ]; [ 23; 27 ]; [ 29; 29 ]; ];

      %
      %
      %
      left  = cspice_wnextd( 'L', window )

      right = cspice_wnextd( 'R', window )

   MATLAB outputs:

      left =

           1
           1
           7
           7
          23
          23
          29
          29

      right =

           3
           3
          11
          11
          27
          27
          29
          29

      %
      % A similar operation using MATLAB native functionality,
      % though the returned arrays are not Mice windows identical
      % to the cspice_wnextd result.
      %
      index_left = 1: 2 : numel(window);
      index_right= index_left + 1;

      left  = window( index_left )
      right = window( index_right)

   MATLAB outputs:

      left =

           1
           7
          23
          29

      right =

           3
          11
          27
          29

Particulars


   This function returns a window composed of singleton intervals
   containing one of the endpoints of the intervals in 'window'.

Required Reading


   For important details concerning this module's function, please refer to
   the CSPICE routine wnextd_c.

   MICE.REQ
   WINDOWS.REQ

Version


   -Mice Version 1.0.1, 12-MAR-2012, EDW (JPL), SCK (JPL)

      Edited I/O section to conform to NAIF standard for Mice documentation.

   -Mice Version 1.0.0, 24-JUL-2007, EDW (JPL)

Index_Entries


   extract the endpoints from a d.p. window


Wed Apr  5 18:00:36 2017