Access information contained in MDF file


mdfObj = mdf(mdfFileName)



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('MDFFile.mf4')
MDF with properties:

   File Details
                 Name: 'MDFFile.mf4'
                 Path: 'c:\temp\MDFFile.mf4'
               Author: 'HOK'
           Department: 'Research'
              Project: 'MDF'
              Subject: 'CAN bus'
              Comment: 'This file contains CAN messages'
              Version: '4.10'
             DataSize: 32100
     InitialTimestamp: 2016-02-27 12:09:02

   Creator Details
    ProgramIdentifier: 'mmddff.04'
              Creator: [1×1 struct]

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

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, and Channel

Introduced in R2016b