How to read MDF Files into Matlab?

41 vues (au cours des 30 derniers jours)
Keith Knoll
Keith Knoll le 11 Nov 2019
Modifié(e) : Walter Roberson le 5 Nov 2025 à 18:56
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

Réponse acceptée

Urmila Rajpurohith
Urmila Rajpurohith le 14 Nov 2019
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);
  2 commentaires
ASSILA
ASSILA le 6 Mai 2024
Thank you it works
Andrei
Andrei le 5 Nov 2025 à 18:49
After using the mdfSort function to sort the file, the recommended way to read data from MDF files in MATLAB is mdfRead function in Vehicle Network Toolbox.

Connectez-vous pour commenter.

Plus de réponses (0)

Produits

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by