MATLAB Function Reference | ![]() ![]() |
Return information about a CDF file
Syntax
Description
info = cdfinfo(file)
returns information about the Common Data Format (CDF) file specified in the string, file
. The function returns a structure, info
, that contains the fields shown in the following table.
The GlobalAttributes and VariableAttributes Fields
GlobalAttributes
and VariableAttributes
are structure arrays that each contain one field for each global or variable attribute respectively. The name of the field corresponds to the name of an attribute. The data in that field, contained in a cell array, represents the entry values for that attribute.
For VariableAttributes
, the attribute data resides in an 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.
The Variables Field
The Variables
field of the returned info
structure is an N-by-6 cell array, where N is the number of variables. The six columns of the cell array contain the following information.
Column No. |
Description |
Return Type |
1 |
Name of the variable |
String |
2 |
Dimensions of the variable, as returned by the size function |
Double array |
3 |
Number of records assigned for the variable |
Double |
4 |
Data type of the variable, as stored in the CDF file |
String |
5 |
Record and dimension variance settings for the variable. The single |
String |
6 |
Sparsity of the variable's records. This is a string holding one of three possible values: |
String |
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 | ![]() |