Skip to Main Content Skip to Search
Product Documentation

cdflib.getVarRecordData - Entire record for variable

Syntax

data = cdflib.getVarRecordData(cdfId,varNum,recNum)

Description

data = cdflib.getVarRecordData(cdfId,varNum,recNum) returns the data in a record associated with 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.

varNum

Numeric value that identifies the variable in the CDF file. Variable numbers are zero-based.

recNum

Numeric value that identifies the record in the variable. Record numbers are zero-based.

Output Arguments

data

Data in the record.

Examples

Open the example CDF, and then get the data associated with a record in a variable:

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

% Get data in first record in first variable in file.
recData = cdflib.getVarRecordData(cdfid,0,0)

recData =

    6.3146e+013

%  Clean up
cdflib.close(cdfid)

clear cdfid

References

This function corresponds to the CDF library C API routine CDFgetzVarRecordData. 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.getVarData | cdflib.hyperGetVarData | cdflib.putVarRecordData

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