How to read MDF Files into Matlab?

조회 수: 40 (최근 30일)
Keith Knoll
Keith Knoll 2019년 11월 11일
편집: Walter Roberson 대략 21시간 전
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

채택된 답변

Urmila Rajpurohith
Urmila Rajpurohith 2019년 11월 14일
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
ASSILA
ASSILA 2024년 5월 6일
Thank you it works
Andrei
Andrei 대략 9시간 전
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.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

제품

Community Treasure Hunt

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

Start Hunting!

Translated by