Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

cdflib.deleteVarRecords

Delete range of records from variable

Syntax

cdflib.deleteVarRecords(cdfId,varNum,startRec,endRec)

Description

cdflib.deleteVarRecords(cdfId,varNum,startRec,endRec) deletes a range of records from a variable in a Common Data Format (CDF) file.

Input Arguments

cdfId

Identifier of a CDF file, returned by a call to cdflib.create or cdflib.open.

varNum

Numeric value that identifies the variable. Variable numbers are zero-based.

startRec

Numeric value that specifies the record at which to start deleting records. Record numbers are zero-based.

endRec

Numeric value that specifies the record at which to stop deleting records. Record numbers are zero-based.

Examples

Make a writable copy of the example CDF, get the number of a variable in the CDF, and delete specific records in the variable. To run this example, you must be in a writable folder.

srcFile = fullfile(matlabroot,'toolbox','matlab','demos','example.cdf');
copyfile(srcFile,'myfile.cdf');
fileattrib('myfile.cdf','+w');
cdfid = cdflib.open('myfile.cdf');
varnum = cdflib.getVarNum(cdfid,'Temperature');
cdflib.deleteVarRecords(cdfid,varnum,1,2);
cdflib.close(cdfid);

Related Examples

References

This function corresponds to the CDF library C API routine CDFdeletezVarRecords.

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.

Was this topic helpful?