cdflib.setVarSparseRecords
Specify how variable handles sparse records
Syntax
cdflib.getVarSparseRecords(cdfId,varNum,
stype
)
Description
cdflib.getVarSparseRecords(cdfId,varNum,
specifies the sparse records type of a variable in a Common Data Format
(CDF) file.stype
)
Input Arguments
|
Identifier of a CDF file, returned by a call to | ||||||||
|
Number that identifies the variable to be set. Variable numbers are zero-based. | ||||||||
|
One of the following character vectors or string scalars that specifies how the variable handles sparse records, or its numeric equivalent.
To get the numeric equivalent of these values, use the
|
Examples
Open a multifile CDF and close a variable.
Create a CDF, create a variable, and set the sparse records type of the variable. To run this example you must be in a writable folder.
cdfId = cdflib.create("your_file.cdf"); % Create a variable in the file varNum = cdflib.createVar(cdfId,"Time","cdf_int1",1,[],true,[]); % Check the sparse records type of the variable stype = cdflib.getVarSparseRecords(cdfId,varNum)
stype = 'NO_SPARSERECORDS'
% Set the sparse records type of the variable cdflib.setVarSparseRecords(cdfId,varNum,"PAD_SPARSERECORDS") % Check the new sparse records type of the variable stype = cdflib.getVarSparseRecords(cdfId,varNum)
stype = 'PAD_SPARSERECORDS'
%Clean up cdflib.delete(cdfId) clear cdfId
Tips
This function corresponds to the CDF library C API routine
CDFsetzVarSparseRecords
.To use this function, you must be familiar with the CDF C interface. You can access the CDF documentation at the CDF website.