CSPICE_WNINSD inserts an interval into a double precision window.
Given:
left,
right left and right endpoints of the interval to insert.
[1,1] = size(right); double = class(right)
window_i optional input SPICE window containing zero or more
intervals. Inclusion of this window argument results in an
output window consisting of a union of the data in 'window_i'
and the window defined as [left,right].
[2m,1] = size(window_i); double = class(window_i)
the call:
window = cspice_wninsd( left, right )
or
window = cspice_wninsd( left, right, window_i )
returns:
window SPICE Window consisting of either the interval [left,right] or
the window union of 'window_i' and [left,right]
[2n,1] = size(window); double = class(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.
%
% Create an empty 'window' to hold the data.
%
window = zeros(0,1)
% Let 'window' contain the intervals
%
% [ 1, 3 ] [ 7, 11 ] [ 23, 27 ]
%
data = [ 1, 3, 7, 11, 23, 27];
%
% Add the data to 'window'.
%
for i=1:numel(data)/2
window = cspice_wninsd( data(2*i  1), data(2*i), window );
end
%
% Note, the direct assignment:
%
% window = [ [1; 3]; [7; 11]; [23; 27] ];
%
% will also perform the assignment of 'data' to 'window' but
% NAIF recommends using cspice_wninsd when possible.
%
%
% Perform a series of cspice_wninsd calls, adding intervals
% to 'window':
%
window = cspice_wninsd( 5,5, window )
MATLAB outputs:
window =
1
3
5
5
7
11
23
27
Representing the intervals:
[ 1, 3] [ 5, 5] [ 7, 11] [ 23, 27]
window = cspice_wninsd( 4,8, window )
MATLAB outputs:
window =
1
3
4
11
23
27
Representing the intervals:
[ 1, 3] [ 4, 11] [ 23, 27]
window = cspice_wninsd( 0,30, window )
MATLAB outputs:
window =
0
30
Representing the intervals:
[ 0, 30]
window = cspice_wninsd( 31,32, window )
MATLAB outputs:
window =
0
30
31
32
Representing the intervals:
[ 0, 30] [31, 32]
None.
For important details concerning this module's function, please refer to
the CSPICE routine wninsd_c.
MICE.REQ
WINDOWS.REQ
Mice Version 1.0.2, 12MAR2012, EDW (JPL), SCK (JPL)
Edited I/O section to conform to NAIF standard for Mice documentation.
Mice Version 1.0.1, 21OCT2008, EDW (JPL)
Edited example to demonstrate creation of, and loading of,
an empty window.
Mice Version 1.0.0, 10JUL2007, EDW (JPL)
insert an interval into a d.p. window
