Specify initial number of records written to variable
cdflib.setVarInitialRecs(cdfId,varNum,numrecs)
cdflib.setVarInitialRecs(cdfId,varNum,numrecs)
specifies the initial number of records to write to a variable in
a Common Data Format (CDF) file.
|
Identifier of a CDF file, returned by a call to |
|
Numeric value identifying a variable in the file. Variable numbers are zero-based. |
|
Numeric value specifying the number of records to write. |
Create a CDF, create a variable, and then specify the number of records to write for 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,'Grades','cdf_int1',1,[],true,[]); % Specify the number of records to write for the variable cdflib.setVarInitialRecs(cdfid,varNum,100); recsWritten = cdflib.getVarNumRecsWritten(cdfid,varNum) recsWritten = 100 % Clean up cdflib.delete(cdfid) clear cdfid
This function corresponds to the CDF library C API routine CDFsetzVarInitialRecs
.
To use this function, you must be familiar with the CDF C
interface. Read the CDF documentation at the CDF website
.
For copyright information, see the cdfcopyright.txt
file.