Skip to Main Content Skip to Search
Product Documentation

cdflib.getVarCacheSize - Number of multifile cache buffers

Syntax

numBuffers = cdflib.getVarCacheSize(cdfId,varNum)

Description

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.

Examples

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 cdfid

References

This 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.

See Also

cdflib.setVarCacheSize

Tutorials

  


Free MATLAB Interactive Kit

Explore how to use MATLAB to make advancements in engineering and science.


Download free kit

Trials Available

Try the latest version of MATLAB and other MathWorks products.


Get trial software
 © 1984-2012- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS