How can I import mdf4 files using mdfimport?

49 views (last 30 days)
Denis Ott
Denis Ott on 7 Aug 2015
Answered: Andrei ongeveer 15 uur ago
How can I import mdf4 files using mdfimport? I want to import mdf4 file (.mf4) using the mdfimport. - The function mdfimport at itself is running - I open MDF File then the folowing error message pop up: not valid file type
  5 Comments
Aakhilesh Singhania
Aakhilesh Singhania on 13 Mar 2019
Is there an available solution to this problem?

Sign in to comment.

Answers (5)

Fabian Aigner
Fabian Aigner on 9 Jun 2016
As far as I know, the mdf import module available at mathworks file exchange is only able to read MDF Version 3 files (or .dat when using INCA). Due to the much more complex specification of MDF 4 compared to MDF 3 (including some mechanisms to compress the a MDF 4.1 file), I don't know any available MATLAB freeware for importing MDF 4 files. There is an option for python ( https://pypi.python.org/pypi/mdfreader/0.2.1 ), but I have no experience with that at the moment.
  4 Comments
Yara
Yara on 20 Nov 2023
@Walter Roberson is this the only way to access .mf4 file? The only way I know is converting it to a .dat (MDF v3) file. Thank you.

Sign in to comment.


Abdul Moeed Amjad
Abdul Moeed Amjad on 8 Oct 2019
Hi,
I don't know whether my post is related or not but I extracted the data from mf4 files (obtained through dSPACE) using sequence of these commands:
1st: mdfds = mdfDatastore('buf_011.MF4');
2nd: data=readall(mdfds);
Regards
  3 Comments
zhaoliang yan
zhaoliang yan on 27 Jun 2021
As I know ,this readall() will load the first chanel of same raster of the first one.
Do you know how to deal with different rasters in one mdf files?
Is there some tool in matlab to resample mdf files?
Walter Roberson
Walter Roberson on 27 Jun 2021
set the SelectedChannelGroupNumber property?

Sign in to comment.


Walter Roberson
Walter Roberson on 25 Apr 2016
perhaps MDF Import Tool and Function updated for mdf-file format from INCA 7.1.9 in the File Exchange.
I cannot seem to find an example mf4 file to test this with.
  2 Comments
Walter Roberson
Walter Roberson on 4 May 2016
I tried the tool a bit. I found a problem in it assuming a non-zero number of channels, and I repaired that in my copy. However, it then reached end of file in the test file unexpected. Testing further, I can see that it has interpreted parts of the file that are intended to be text as if they are data offsets. Either it is the wrong program to read those files, or else it has fundamental bugs beyond my available time to investigate.

Sign in to comment.


Walter Roberson
Walter Roberson on 1 Aug 2019
These days, Vehicle Network Toolbox mdf() function supports MDF 4 files.
  2 Comments
Jonas B
Jonas B on 6 Sep 2019
Hi Walter,
is the support of MDF 4 files in the Vehicle Network Toolbox available in Matlab 2016b ?
And there is no freeware of the toolbox, right?
Walter Roberson
Walter Roberson on 8 Oct 2019
Yes, R2016b was the first release to introduce MDF4 files, as part of the Vehicle Network Toolbox

Sign in to comment.


Andrei
Andrei ongeveer 15 uur ago
mdfRead function in Vehicle Network Toolbox is the recommended way to read data from MDF files in MATLAB

Categories

Find more on Vehicle Dynamics and Scenarios in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!