cdflib.hyperGetVarData
Read hyperslab of data from variable
Syntax
data = cdflib.hyperGetVarData(cdfId,varNum,recSpec,dimSpec)
data = cdflib.hyperGetVarData(cdfId,varNum,recSpec)
Description
data = cdflib.hyperGetVarData(cdfId,varNum,recSpec,dimSpec)
reads a hyperslab of data from a variable in the Common Data Format
(CDF) file. Hyper access allows more than one value to be read from
or written to a variable with a single call to the CDF library.
data = cdflib.hyperGetVarData(cdfId,varNum,recSpec)
reads a hyperslab of data for a zero-dimensional variable in the
Common Data Format (CDF) file.
Input Arguments
|
Identifier of a CDF file, returned by a call to |
|
Number identifying the variable containing the datum. |
|
Three-element array, |
|
Three-element cell array, |
Examples
Open the example CDF file, and then get all the data associated with a variable:
cdfId = cdflib.open("example.cdf"); % Determine number of records allocated for first variable in the file maxRecNum = cdflib.getVarMaxWrittenRecNum(cdfId,0); % Retrieve all data in records for variable data = cdflib.hyperGetVarData(cdfId,0,[0 maxRecNum 1])
data = 1.0e+13 * 6.3146 6.3146 6.3146 6.3146 6.3146 6.3146 6.3146 6.3146 6.3146 6.3146 6.3146 6.3146 6.3146 6.3146 6.3146 6.3146 6.3146 6.3146 6.3146 6.3146 6.3146 6.3146 6.3146
% Clean up cdflib.close(cdfId) clear cdfId
Tips
This function corresponds to the CDF library C API routine
CDFhyperGetzVarData
.To use this function, you must be familiar with the CDF C interface. You can access the CDF documentation at the CDF website.