Main Content


(Not recommended) Access information contained in MDF file

The mdf function is not recommended and might be removed in a future release. Use mdfRead (Vehicle Network Toolbox) and related functions instead. See Compatibility Considerations.


The mdf function creates an object for accessing a measurement data format (MDF) file. See Measurement Data Format (MDF).


mdfObj = mdf(mdfFileName) identifies a measurement data format (MDF) file and returns an MDF file object, which you can use to access information and data contained in the file. You can specify a full or partial path to the file.


collapse all

Create an MDF object for a given file, and view the object display.

mdfObj = mdf("Logging_MDF.mf4")
mdfObj = 

  MDF with properties:

   File Details
                 Name: 'Logging_MDF.mf4'
                 Path: 'C:\myVNTData\Logging_MDF.mf4'
               Author: ''
           Department: ''
              Project: ''
              Subject: ''
              Comment: ''
              Version: '4.10'
             DataSize: 1542223
     InitialTimestamp: 2020-06-25 20:41:13.133000000

   Creator Details
    ProgramIdentifier: 'MDF4Lib'
              Creator: [1×1 struct]

   File Contents
           Attachment: [5×1 struct]
         ChannelNames: {62×1 cell}
         ChannelGroup: [1×62 struct]

           Conversion: Numeric

Input Arguments

collapse all

MDF file name, specified as a character vector or string, including the necessary full or relative path.

Example: 'MDFFile.mf4'

Data Types: char | string

Output Arguments

collapse all

MDF file, returned as an MDF file object. The object provides access to the MDF file information contained in the following properties.

NameName of the MDF file, including extension
PathFull path to the MDF file, including file name
AuthorAuthor who originated the MDF file
DepartmentDepartment that originated the MDF file
ProjectProject that originated the MDF file
SubjectSubject matter in the MDF file
CommentOpen comment field from the MDF file
VersionMDF standard version of the file
DataSizeTotal size of the data in the MDF file, in bytes
InitialTimestampTime when file data acquisition began in UTC or local time
ProgramIdentifierOriginating program of the MDF file
CreatorStructure containing details about creator of the MDF file, with these fields: VendorName, ToolName, ToolVersion, UserName, and Comment
AttachmentStructure of information about attachments contained within the MDF file, with these fields: Name, Path, Comment, Type, MIMEType, Size, EmbeddedSize, and MD5CheckSum
ChannelNamesCell array of the channel names in each channel group
ChannelGroupStructure of information about channel groups contained within the MDF file, with these fields: AcquisitionName, Comment, NumSamples, DataSize, Sorted, SourceInfo, and Channel

Conversion option for data in the MDF file. Supported values are:

  • 'Numeric' (default) — Apply only numeric conversion rules (CC_Type 1-6). Data with non-numeric conversion rules is imported as raw, unconverted values.

  • 'None' — Do not apply any conversion rules. All data is imported as raw data.

  • 'All' — Apply all numeric and text conversion rules (CC_Type 1-10).

More About

collapse all

Measurement Data Format (MDF)

Measurement data format (MDF) files are binary format files for storing measurement data. The format standard is defined by the Association for Standardization of Automation and Measuring Systems (ASAM), which you can read about at ASAM MDF.

Vehicle Network Toolbox™ and Powertrain Blockset™ provide access to MDF files through an object you create with the mdf function.

Version History

Introduced in R2016b

expand all

See Also