mdfimport no longer works - Matlab 2020b

6 次查看(过去 30 天)
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....

回答(1 个)

Shubham
Shubham 2024-10-8
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!

类别

Help CenterFile Exchange 中查找有关 Introduction to Installation and Licensing 的更多信息

产品


版本

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by