Skip to Main Content Skip to Search
Product Documentation

cdfinfo - Information about Common Data Format (CDF) file

Syntax

info = cdfinfo(filename)

Description

info = cdfinfo(filename) returns information about the Common Data Format (CDF) file specified in the string filename.

The following table lists the fields returned in the structure, info. The table lists the fields in the order that they appear in the structure.

Field

Description

Filename

Text string specifying the name of the file

FileModDate

Text string indicating the date the file was last modified

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

FileSettings

Structure array containing library settings used to create the file

Subfiles

Filenames containing the CDF file's data, if it is a multi-file format CDF

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 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)

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.

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.

Examples

info = cdfinfo('example.cdf')
info = 
              Filename: 'example.cdf'
           FileModDate: '09-Mar-2001 15:45:22'
              FileSize: 1240
                Format: 'CDF'
         FormatVersion: '2.7.0'
          FileSettings: [1x1 struct]
              Subfiles: {}
             Variables: {5x6 cell}
      GlobalAttributes: [1x1 struct]
    VariableAttributes: [1x1 struct]

info.Variables
ans = 
  'Time'         [1x2 double] [24] 'epoch'  'T/'     'Full'
  'Longitude'    [1x2 double] [ 1] 'int8'   'F/FT'   'Full'
  'Latitude'     [1x2 double] [ 1] 'int8'   'F/TF'   'Full'
  'Data'         [1x3 double] [ 1] 'double' 'T/TTT'  'Full'
  'multidim'     [1x4 double] [ 1] 'uint8'  'T/TTTT' 'Full'

See Also

cdflib.setValidate | cdfread

  


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