Index Page
cspice_wncard
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_WNCARD returns the cardinality (number of intervals) of a
   double precision window.

I/O


   Given:

      window   SPICE window containing zero or more intervals.

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

   the call:

      card = cspice_wncard( window )

   returns:

      card   the cardinality (number of intervals) of the input 'window'.

             [1,1] = size(card); int32 = class(card)

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.

      %
      % Define a window with three intervals (six values).
      %
      darray = [ [ 1., 3.]; [ 7., 11.]; [23., 27.] ];

      %
      % Create a window, insert data into the window.
      %
      win1 = eye(0,1);

      for i=1:3

         win1 = cspice_wninsd( darray(i,1), darray(i,2) , win1 );

      end

      %
      % What's the window cardinality of 'win1'?
      %
      cardinality = cspice_wncard(win1);

      %
      % Print the window cardinality (this ought to show "3" ).
      %
      fprintf('Number of intervals in the window: %d\n', cardinality )

   Matlab outputs:

      Number of intervals in the window: 3

Particulars


   This function returns the value numel(window)/2.

Required Reading


   For important details concerning this module's function, please refer to
   the CSPICE routine wncard_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, 30-DEC-2008, EDW (JPL)

Index_Entries


   cardinality of a d.p. window


Wed Apr  5 18:00:36 2017