CSPICE_GCPOOL returns the value of a string kernel variable
(scalar or array) from the kernel pool.
name name of a pool variable associated to string values.
[1,m] = size(name); char = class(name)
start value for the index indicating the first component of the data
vector assigned to 'name' for return (index 1 for all
[1,1] = size(start); int32 = class(start)
room value specifying the maximum number of components that can
return for 'name'.
[1,1] = size(room); int32 = class(room)
[cvals, found] = cspice_gcpool( name, start, room )
cvals the values assigned to 'name' beginning at index 'start'.
'cvals' returns empty if the variable 'name' does not exist in
the kernel pool.
[n,m] = size(cvals); char = class(cvals)
found the flag indicating true if 'name' exists in the kernel pool and
has character type, false if it is not.
[1,1] = size(found); logical = class(found)
'cvals' has a size of 'room' or less (N<='room').
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.
% Load a kernel containing the variable assignments:
% CTEST_VAL = ('LARRY', 'MOE', 'CURLY' )
% ITEST_VAL = ( 3141, 186, 282 )
% DTEST_VAL = ( 3.1415, 186., 282.397 )
cspice_furnsh( 'pool_t.ker' )
% Retrieve up-to 'ROOM' character entries for
% kernel pool variable named 'CTEST_VAL' to
% the array named 'cvals'. The first index to return,
% 'START', has value 1 (this returns all strings).
VAR = 'CTEST_VAL';
ROOM = 25;
START = 1;
% cspice_gcpool returns an empty array if the variable
% does not exist in the kernel pool.
[cvals, found] = cspice_gcpool( VAR, START, ROOM );
if ( found )
txt = sprintf( 'Found %s in the kernel pool', VAR );
n_elements = size( cvals, 1 );
% Retrieve the number of elements returned in 'cvals' from the
% first element returned from "size".
txt = sprintf( ' Element %d of %s: ``%s``', n, VAR, cvals(n,:) );
txt = sprintf( 'Failed to find %s in the kernel pool', VAR );
% It's always good form to unload kernels after use,
% particularly in MATLAB due to data persistence.
Found CTEST_VAL in the kernel pool
Element 1 of CTEST_VAL: ``LARRY``
Element 2 of CTEST_VAL: ``MOE``
Element 3 of CTEST_VAL: ``CURLY``
For important details concerning this module's function, please refer to
the CSPICE routine gcpool_c.
-Mice Version 1.2.1, 01-JUN-2016, EDW (JPL)
Corrected typo in example code. Ouput loop showed use of "i" rather
-Mice Version 1.2.0, 12-MAR-2012, EDW (JPL), SCK (JPL)
"logical" call replaced with "zzmice_logical."
I/O descriptions edits to conform to Mice documentation format.
-Mice Version 1.0.0, 06-MAR-2007, EDW (JPL)
RETURN the character value of a pooled kernel variable
RETURN the string value of a pooled kernel variable