MATLAB Function Reference |
Return information about CDF file
Syntax
Description
info = cdfinfo(file)
returns information about the Common Data Format (CDF) file specified in the string file
.
The return value, info
, is a structure that contains the fields listed alphabetically in the following table.
Field |
Description |
|
FileModDate |
Text string indicating the date the file was last modified | |
Filename |
Text string specifying the name of the file | |
FileSettings |
Structure array containing library settings used to create the file | |
FileSize |
Double scalar specifying the size of the file, in bytes | |
Format |
Text string specifying the file format | |
FormatVersion |
Text string specifying the version of the CDF library used to create the file | |
GlobalAttributes |
Structure array that contains one field for each global attribute. The name of each field corresponds to the name of an attribute. The data in each field, contained in a cell array, represents the entry values for that attribute. | |
Subfiles |
Filenames containing the CDF file's data, if it is a multifile CDF | |
VariableAttributes |
Structure array that contains one field for each variable attribute. The name of each field corresponds to the name of an attribute. The data in each field is contained in a n-by-2 cell array, where n is the number of variables. The first column of this cell array contains the variable names associated with the entries. The second column contains the entry values. | |
Variables |
N-by-6 cell array, where N is the number of variables, containing information about the variables in the file. The columns present the following information: | |
|
Column 1 |
Text string specifying name of variable |
|
Column 2 |
Double array specifying the dimensions of the variable, as returned by the size function |
|
Column 3 |
Double scalar specifying the number of records assigned for the variable |
|
Column 4 |
Text string specifying the data type of the variable, as stored in the CDF file |
|
Column 5 |
Text string specifying the record and dimension variance settings for the variable. The single |
|
Column 6 |
Text string specifying the sparsity of the variable's records, with these possible values: |
Examples
info = cdfinfo('example.cdf') info = Filename: 'example.cdf' FileModDate: '29-Jun-1995 05:51:58' FileSize: 230513 Format: 'CDF' FormatVersion: '2.4.8' FileSettings: [1x1 struct] Subfiles: {} Variables: {7x6 cell} GlobalAttributes: [1x1 struct] VariableAttributes: [1x1 struct] info.Variables ans = 'L_gse' [1x2 double] [ 1] 'char' 'F/T' 'Full' 'Status%C1' [1x2 double] [7493] 'uint8' 'T/T' 'Full' 'B_gse%C1' [1x2 double] [7493] 'single' 'T/T' 'Full' 'B_nsigma%C1' [1x2 double] [7493] 'single' 'T/' 'Full'
See Also
cdfepoch | cdfread |
© 1994-2005 The MathWorks, Inc.