CSPICE_WNCOND contracts each of the intervals of a double
precision window.
Given:
left amount to add to each left interval endpoint in the input
'window'.
[1,1] = size(left); double = class(left)
right amount to subtract to each right interval endpoint in the input
'window'.
[1,1] = size(right); double = class(right)
window SPICE window containing zero or more intervals.
[2m,1] = size(window); double = class(window)
the call:
window_f = cspice_wncond( left, right, window)
returns:
window_f SPICE window containing zero or more intervals, representing
the original 'window' with each of its intervals contracted
by 'left' units on the left and 'right' units on the right
[2n,1] = size(window_f); double = class(window_f)
'window_f' can overwrite 'window'.
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 ]; ];
%
% Apply the following series of calls:
%
window = cspice_wncond( 2, 1, window )
window = cspice_wncond( 2, 2, window )
window = cspice_wncond( 2, 1, window )
MATLAB outputs:
window =
9
10
25
26
Representing the intervals:
[ 9, 10 ] [ 25, 26 ]
window =
7
8
23
24
Representing the intervals:
[ 7, 8 ] [ 23, 24 ]
window =
5
9
21
25
Representing the intervals:
[ 5, 9 ] [ 21, 25 ]
Note that intervals may be "contracted" by negative amounts.
In the example above, the second call shifts each interval to
the left, while the third call undoes the effect of the first
call (without restoring the destroyed intervals).
Note also that the third call is exactly equivalent to the
call:
cspice_wnexpd( 2, 1, window )
None.
For important details concerning this module's function, please refer to
the CSPICE routine wncond_c.
MICE.REQ
WINDOWS.REQ
Mice Version 1.0.1, 12MAR2012, EDW (JPL), SCK (JPL)
Edited I/O section to conform to NAIF standard for Mice documentation.
Mice Version 1.0.0, 24JUL2007, EDW (JPL)
contract the intervals of a d.p. window
