reading mdf file and plotting data fails

6 views (last 30 days)
Bjoern Hackert
Bjoern Hackert on 8 Feb 2019
Commented: derecho on 9 Sep 2020
Hi all
I have some mdf files, created by Vector Canoe, and want to read and plot them in Matlab2016b
First file T036 is a mdf3.0, second file T037 is a mdf4.1 (attached)
I try to read the first file like this
a = mdf('T036.mdf')
I get an error
Error in asam.MDF/delete
Error in asam.MDF
Error in mdf (line 25)
out = asam.MDF(file);
> In asam.MDF
In mdf (line 25)
MDF file invalid format.
Reading the second file like this
b = mdf('T037.mdf')
will return no error, the mdf file I just read has 855 channels.
So I want to read a certain channel like this
c = read(b,1,b.ChannelNames{1})
and then plot the channel by
plot (c.Time, c.posX)
This works fine, but only for ~500 of the channels.
c = read(b,507,b.ChannelNames{507})
will work fine, but
c = read(b,508,b.ChannelNames{508})
returns error code
Unable to read from MDF file.
Soooo....
is there something wrong I am doing this?
Or is there an error in the mdf file?
Also, why I can't read the 3.0 file?
Thanks in advance

Answers (1)

Bjoern Hackert
Bjoern Hackert on 11 Feb 2019
Edited: Bjoern Hackert on 12 Feb 2019
I loaded the files for fun in NI Labview, no problems there, so I guess the files are alright.
  1 Comment
derecho
derecho on 9 Sep 2020
hey did you solve the problem? i have the same problem here

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!