MATLAB Function Reference    
cdfinfo

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.

Field
Description
Return Type
FileModDate
Date the file was last modified
String
Filename
Name of the file
String
FileSettings
Library settings used to create the file
Structure array
FileSize
Size of the file, in bytes
Double
Format
File format (CDF)
String
FormatVersion
Version of the CDF library used to create the file
String
GlobalAttributes
Global metadata
Structure array
Subfiles
Filenames containing the CDF file's data, if it is a multifile CDF
Cell array
VariableAttributes
Metadata for the variables
Structure array
Variables
Details about the variables in the file
Cell array

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 T or F to the left of the slash designates whether values vary by record. The zero or more T or F letters to the right of the slash designate whether values vary at each dimension. Here are some examples.

  • T/      (scalar variable)
    F/T     (one-dimensional variable)
    T/TFF   (three-dimensional variable)
    
String
6

Sparsity of the variable's records. This is a string holding one of three possible values:

  • 'Full'
  • 'Sparse (padded)'
  • 'Sparse (nearest)'
String

Examples

See Also

cdfread


  cdfepoch cdfread