| Contents | Index |
cdflib.closeVar(cdfId,varNum)
cdflib.closeVar(cdfId,varNum) closes a variable in a multifile format CDF.
cdfId identifies the CDF file and varNum is a numeric value that specifies the variable. Variable identifiers (variable numbers) are zero-based.
For multifile CDFs, you must close all open variable files to guarantee that all modifications you have made are actually written to the CDF file(s). You do not need to call this function for variables in a single-file format CDF.
Create a multifile CDF, create a variable, and then close the variable. To run this example, you must be in a writable folder.
cdfid = cdflib.create('your_multifile.cdf');
% Make it a multifile format CDF
cdflib.setFormat(cdfid,'MULTI_FILE')
% Create a variable in the CDF.
varNum = cdflib.createVar(cdfid,'Time','cdf_int1',1,[],true,[]);
% Close the variable.
cdflib.closeVar(cdfid, varnum)
% Clean up
cdflib.delete(cdfid)
clear cdfid
This function corresponds to the CDF library C API routine CDFclosezVar. To use this function, you must be familiar with the CDF C interface. Read the CDF documentation at the CDF Web site. For copyright information, see the cdfcopyright.txt file.
cdflib.getFormat | cdflib.getVarNum | cdflib.setFormat

Explore how to use MATLAB to make advancements in engineering and science.
| © 1984-2012- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |