mdfimport no longer works - Matlab 2020b

5 views (last 30 days)
Garett McConnell
Garett McConnell on 1 Oct 2024
Answered: Shubham on 8 Oct 2024
I have been using mdfimport.m from the file exchange to import Inca .dat files. I have a new laptop with Matlab 2020b and this script now errors and I am trying to figure out why. It worked in 2019b. Error messaging and I am getting is
Reference to non-existent field 'CNBlock'.
Error in mdfimport>mdfinfo (line 1430)
pos=zeros(length(CGBlockTemp.CNBlock),1);
Error in mdfimport>parseparameters (line 2498)
[MDFsummary, options.MDFInfo, counts, channelList]=mdfinfo(options.fileName);
Error in mdfimport (line 61)
options=parseparameters(varargin);
Error in Knk_Bkgnd_Adaptive_max_min_107_remove_inits (line 6)
mdfimport(MDFFilesInfo(k).name,[],...
Any help is appreciated....

Answers (1)

Shubham
Shubham on 8 Oct 2024
Hi Garett,
The error "Reference to non-existent field 'CNBlock'" when using "mdfimport" in MATLAB 2020b likely results from changes in the MDF file structure or compatibility issues with the newer MATLAB version.
Since the author is no longer maintaining "mdfimport" on the File Exchange, I recommend switching to MATLAB's built-in MDF functionality available in the Vehicle Network Toolbox. This approach is more reliable and compatible with recent MATLAB versions and modern MDF formats. You can use the "mdf" function for this purpose. More details can be found here:
Note that the "mdf" function will be deprecated and removed in future releases. Instead, use the new "mdfRead" function:
Hope this helps!

Categories

Find more on Introduction to Installation and Licensing in Help Center and File Exchange

Products


Release

R2020b

Community Treasure Hunt

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

Start Hunting!