cspice_wnincd

 Abstract I/O Examples Particulars Required Reading Version Index_Entries

#### Abstract

```
CSPICE_WNINCD determines whether an interval is included in a
double precision window.

```

#### I/O

```
Given:

left,
right    values defining the endpoints of an interval, which may or may
not exist in one of the intervals in 'window'

[1,1] = size(right); double = class(right)

window   SPICE window containing zero or more intervals.

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

the call:

retval = cspice_wnincd( left, right, window )

returns:

A a boolean with value true if the input interval exists in
'window'

a(i)  <  left  <  right  <  b(i)
-        -         -

for some interval [ a(i), b(i) ] in 'window', false
otherwise.

```

#### 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 ]; ];

%
% Define a set of test intervals.
%
t_arr = [ [  1, 3 ]; ...
[  9, 10]; ...
[  0, 20]; ...
[ 13, 15]; ...
[ 29, 30] ];

%
% Loop over the test intervals.
%
% The number of test intervals equals half the
% number of elements for the Nx2 array 't_arr'.
%
for i=1:numel(t_arr)/2

chk = cspice_wnincd( t_arr(i,1), t_arr(i,2), window);

if( chk )

fprintf(                                        ...
'%12.5f %12.5f - an element of the window\n', ...
t_arr(i,1), t_arr(i,2))

else

fprintf(                                             ...
'%12.5f %12.5f - not an element of the window\n', ...
t_arr(i,1), t_arr(i,2))

end

end

MATLAB outputs:

1.00000      3.00000 - an element of the window
9.00000     10.00000 - an element of the window
0.00000     20.00000 - not an element of the window
13.00000     15.00000 - not an element of the window
29.00000     30.00000 - not an element of the window

```

```
None.

```

#### Required Reading

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

MICE.REQ
WINDOWS.REQ

```

#### Version

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

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

"logical" call replaced with "zzmice_logical."

Corrected version ID in 23-JUL-2009 entry, "1.0.0" to "1.0.1."

-Mice Version 1.0.1, 23-JUL-2009, EDW (JPL)

Replaced 'boolean' calls with 'logical' as 'boolean' functionally
aliases 'logical'.

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

```

#### Index_Entries

```
included in a d.p. window

```
`Wed Apr  5 18:00:36 2017`