Skip to Main Content Skip to Search
Product Documentation

cdflib.getVarCompression - Information about compression used by variable

Syntax

[ctype,cparams,percent] = cdflib.getVarCompression(cdfId, varNum)

Description

[ctype,cparams,percent] = cdflib.getVarCompression(cdfId, varNum) returns information about the compression used for 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.

Output Arguments

ctype

Text string identifying the type of compression. For a list of compression types, see cdflib.setCompression.

cparams

Any additional parameter required by the compression type.

percent

Numeric value indicating the level of compression, expressed as a percentage.

Examples

Open the example CDF file and check the compression settings of any variable.

cdfid = cdflib.open('example.cdf');

% Check the compression setting of any variable in the file
% The example checks the first variable (variable numbers are zero-based).
[ctype params percent] = cdflib.getVarCompression(cdfid,0)

ctype =

NO_COMPRESSION


params =

     []


percent =

   100

% Clean up
cdflib.close(cdfid);
clear cdfid

References

This function corresponds to the CDF library C API routine CDFgetzVarCompression. 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.setCompression | cdflib.setVarCompression

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