MATLAB Answers

0

How to read MDF Files into Matlab?

Asked by Keith Knoll on 11 Nov 2019 at 16:56
Latest activity Answered by Urmila Rajpurohith on 14 Nov 2019 at 11:16
I'm attempting to read MDF (.mf4) files into Matlab workspace. I'm using the following commands:
mdfObj = mdf('datafile.MF4');
data1 = read(mdfObj);
but get the following error:
Functionality is not implemented for the MDF file.
I have the Vehicle Network Toolbox installed which I think should allow for this read command.
Can you please advise?
Thanks,
Keith

  0 Comments

Sign in to comment.

Products

1 Answer

Answer by Urmila Rajpurohith on 14 Nov 2019 at 11:16
 Accepted Answer

The error you are encountering often occurs when the MDF file is not sorted. By applying a data sort to the file, it becomes readable.
You can use “mdfSort” function to sort the file and make the file readable.
mdfSort ('oldFile.mdf', 'newFile.mdf');
mdfObj = mdf('newFile.mdf');
data = read(mdfObj);

  0 Comments

Sign in to comment.