| Contents | Index |
numBuffers = cdflib.getVarCacheSize(cdfId,varNum)
numBuffers = cdflib.getVarCacheSize(cdfId,varNum) returns the number of cache buffers used for a variable in a Common Data Format (CDF) file.
cdfId identifies the CDF file. varNum is a numeric value that identifies the variable. Variable identifiers are zero-based.
This function applies only to multifile format CDFs. For more information about caching, see the CDF User's Guide.
Create a multifile CDF and retrieve the number of buffers being used for a variable. To run this example, you must be in a writable folder.
cdfid = cdflib.create('your_file.cdf')
% Set the format of the file to be multi-file
cdflib.setFormat(cdfid,'MULTI_FILE');
% Create a variable in the file
varNum = cdflib.createVar(cdfid,'Time','cdf_int1',1,[],true,[]);
% Note how the library creates a separate file for the variable
ls your_file.*
your_file.cdf your_file.z0
% Determine the number of cache buffers used with the variable
numBuf = cdflib.getVarCacheSize(cdfid,varNum)
numBuf =
1
% Clean up
cdflib.delete(cdfid);
clear cdfidThis function corresponds to the CDF library C API routine CDFgetzVarCacheSize. To use these functions, 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.

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 |