Skip to content

Commit 4683d75

Browse files
author
Martin
committed
Update to reflect MATLAB 2021b support for unfinalized MF4 files
1 parent 67c0969 commit 4683d75

File tree

5 files changed

+12
-4
lines changed

5 files changed

+12
-4
lines changed
-588 KB
Binary file not shown.
1 MB
Binary file not shown.
969 KB
Binary file not shown.

examples/other/matlab-basics/matlab_basics.m

+10-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,18 @@
11
% This script uses the MATLAB Vehicle Network Toolbox to load
22
% finalized & sorted MF4 files from the CANedge (Firmware 01.04.01+)
33
% See also below links:
4+
% - https://www.mathworks.com/help/vnt/mdf-files.html
5+
% - https://www.mathworks.com/help/vnt/ug/work-with-unfinalized-and-unsorted-mdf-files.html
46
% - https://se.mathworks.com/help/vnt/ug/reading-data-from-mdf-files.html
57
% - https://se.mathworks.com/help/vnt/ug/using-mdf-files-via-mdf-datastore.html
68
% - https://se.mathworks.com/help/vnt/ug/decoding-can-data-from-mdf-files.html
79

8-
% load a sorted & finalized MF4 file (via the mdf2finalized converter)
9-
m = mdf('00000001_fin.MF4')
10+
% load a 'sorted & finalized' MF4 file (via the mdf2finalized converter)
11+
m = mdf('00000014_fin.MF4')
12+
13+
% or, finalize an unfinalized file via MATLAB and load it (support in MATLAB 2021b+)
14+
finalizedPath = mdfFinalize("00000014.MF4");
15+
m = mdf(finalizedPath);
1016

1117
% extract 5 rows into a timetable
1218
rawTimeTable = read(m, 1, m.ChannelNames{1}, 1, 5)
@@ -19,3 +25,5 @@
1925
% create a signal time table for a specific CAN message and create a plot
2026
signalTimetable1 = canSignalTimetable(msgTimetable, "Message1")
2127
plot(signalTimetable1.Time, signalTimetable1.Signal1)
28+
29+

examples/other/matlab-basics/my_dbc.DBC

+2-2
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ BS_:
3636
BU_:
3737

3838

39-
BO_ 2566901479 Message1: 8 Vector__XXX
40-
SG_ Signal1 : 0|8@1+ (1,10) [0|0] "" Vector__XXX
39+
BO_ 1110 Message1: 8 Vector__XXX
40+
SG_ Signal1 : 0|8@1+ (1,10) [0|2550] "" Vector__XXX
4141

4242

4343

0 commit comments

Comments
 (0)