Skip to Main Content Skip to Search
Product Documentation

cdflib - Summary of Common Data Format (CDF) capabilities

Description

The MATLAB product provides both high-level and low-level access to Common Data Format (CDF) files. The high-level access functions make it easy to read data from a CDF file or write data from the workspace to a CDF file. The low-level interface provides you with more control over the import and export operations.

High-Level Functions

MATLAB includes several functions that provide high-level access to CDF files:

In addition, MATLAB provides functions that convert time data to and from the CDF epoch data type: cdfepoch and todatenum.

Low-Level Functions

MATLAB provides direct access to dozens of functions in the CDF library. Using these functions, you can read and write data, create variables, attributes, and entries, and take advantage of other features of the CDF library. To use these functions, you must be familiar with the CDF C interface. Documentation about CDF, version 3.3.0, is available at the CDF Web site.

The MATLAB functions correspond to functions in the CDF library new Standard Interface. In most cases, the syntax of a MATLAB function is similar to the syntax of the corresponding CDF library function. To use these functions, you must prefix the function name with the package name, cdflib. For example, to use the CDF library function to open an existing CDF file, you would use this syntax:

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

The following tables list all of the functions in the MATLAB CDF library package, grouped by category.

Library Information

cdflibSummary of Common Data Format (CDF) capabilities
cdflib.getConstantNames Names of Common Data Format (CDF) library constants
cdflib.getConstantValue Numeric value corresponding to Common Data Format (CDF) library constant
cdflib.getFileBackwardReturn current backward compatibility mode setting
cdflib.getLibraryCopyright Copyright notice of Common Data Format (CDF) library
cdflib.getLibraryVersion Library version and release information
cdflib.getValidate Library validation mode
cdflib.setFileBackwardSet backward compatibility mode
cdflib.setValidate Specify library validation mode

File Operations

cdflib.closeClose Common Data Format (CDF) file
cdflib.createCreate Common Data Format (CDF) file
cdflib.deleteDelete existing Common Data Format (CDF) file
cdflib.getCacheSize Number of cache buffers used
cdflib.getChecksum Checksum mode
cdflib.getCompression Compression settings
cdflib.getCompressionCacheSize Number of compression cache buffers
cdflib.getCopyright Copyright notice in Common Data Format (CDF) file
cdflib.getFormatFormat of Common Data Format (CDF) file
cdflib.getMajority Majority of variables
cdflib.getName Name of Common Data Format (CDF) file
cdflib.getReadOnlyMode Read-only mode
cdflib.getStageCacheSize Number of cache buffers for staging
cdflib.getVersion Common Data Format (CDF) library version and release information
cdflib.inquireBasic characteristics of Common Data Format (CDF) file
cdflib.openOpen existing Common Data Format (CDF) file
cdflib.setCacheSizeSpecify number of dotCDF cache buffers
cdflib.setChecksum Specify checksum mode
cdflib.setCompression Specify compression settings
cdflib.setCompressionCacheSize Specify number of compression cache buffers
cdflib.setFormatSpecify format of Common Data Format (CDF) file
cdflib.setMajority Specify majority of variables
cdflib.setReadOnlyMode Specify read-only mode
cdflib.setStageCacheSize Specify number of staging cache buffers for Common Data Format (CDF) file

Variables

cdflib.closeVarClose specified variable from multifile format Common Data Format (CDF) file
cdflib.createVarCreate new variable
cdflib.deleteVarDelete variable
cdflib.deleteVarRecordsDelete range of records from variable
cdflib.getVarAllocRecordsNumber of records allocated for variable
cdflib.getVarBlockingFactorBlocking factor for variable
cdflib.getVarCacheSizeNumber of multifile cache buffers
cdflib.getVarCompressionInformation about compression used by variable
cdflib.getVarDataSingle value from record in variable
cdflib.getVarMaxAllocRecNumMaximum allocated record number for variable
cdflib.getVarMaxWrittenRecNumMaximum written record number for variable
cdflib.getVarName Variable name, given variable number
cdflib.getVarNum Variable number, given variable name
cdflib.getVarNumRecsWritten Number of records written to variable
cdflib.getVarPadValuePad value for variable
cdflib.getVarRecordDataEntire record for variable
cdflib.getVarReservePercentCompression reserve percentage for variable
cdflib.getVarsMaxWrittenRecNumMaximum written record number for CDF file
cdflib.getVarSparseRecordsInformation about how variable handles sparse records
cdflib.hyperGetVarDataRead hyperslab of data from variable
cdflib.hyperPutVarDataWrite hyperslab of data to variable
cdflib.inquireVar Information about variable
cdflib.putVarDataWrite single value to variable
cdflib.putVarRecordDataWrite entire record to variable
cdflib.renameVar Rename existing variable
cdflib.setVarAllocBlockRecordsSpecify range of records to be allocated for variable
cdflib.setVarBlockingFactorSpecify blocking factor for variable
cdflib.setVarCacheSizeSpecify number of multi-file cache buffers for variable
cdflib.setVarCompressionSpecify compression settings used with variable
cdflib.setVarInitialRecsSpecify initial number of records written to variable
cdflib.setVarPadValueSpecify pad value used with variable
cdflib.SetVarReservePercentSpecify reserve percentage for variable
cdflib.setVarsCacheSizeSpecify number of cache buffers used for all variables
cdflib.setVarSparseRecordsSpecify how variable handles sparse records

Attributes

cdflib.createAttrCreate attribute
cdflib.deleteAttrDelete attribute
cdflib.deleteAttrEntryDelete attribute entry
cdflib.deleteAttrgEntryDelete entry in global attribute
cdflib.getAttrEntryValue of entry in attribute with variable scope
cdflib.getAttrgEntryValue of entry in global attribute
cdflib.getAttrMaxEntryNumber of last entry for variable attribute
cdflib.getAttrMaxgEntryNumber of last entry for global attribute
cdflib.getAttrNameName of attribute, given attribute number
cdflib.getAttrNumAttribute number, given attribute name
cdflib.getAttrScopeScope of attribute
cdflib.getNumAttrEntriesNumber of entries for attribute with variable scope
cdflib.getNumAttrgEntriesNumber of entries for attribute with global scope
cdflib.getNumAttributesNumber of attributes with variable scope
cdflib.getNumgAttributesNumber of attributes with global scope
cdflib.inquireAttr Information about attribute
cdflib.inquireAttrEntry Information about entry in attribute with variable scope
cdflib.inquireAttrgEntry Information about entry in attribute with global scope
cdflib.putAttrEntryWrite value to entry in attribute with variable scope
cdflib.putAttrgEntryWrite value to entry in attribute with global scope
cdflib.renameAttr Rename existing attribute

Utility Functions

cdflib.computeEpochConvert time value to CDF_EPOCH value
cdflib.computeEpoch16Convert time value to CDF_EPOCH16 value
cdflib.epoch16BreakdownConvert CDF_EPOCH16 value to time value
cdflib.epochBreakdownConvert CDF_EPOCH value into time value

See Also

cdfinfo | cdfread | cdfwrite

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