Skip to content

matlab/matlab-agentic-toolkit / skills-catalog/test-and-measurement/matlab-import-export-vehicle-data

matlab-import-export-vehicle-data

Verified

Use when importing or exporting vehicle data from/to log files (MDF/MF4/DAT, BLF, ASC/TXT), decoding CAN/CAN FD/LIN messages to signals via DBC, ARXML, or LDF databases, writing timetable data to MDF or BLF files, or calling blfread, blfinfo, blfwrite, mdfRead, mdfWrite, mdfCreate, mdfInfo, canSignalImport, canMessageImport, canMessageTimetable, canFDMessageTimetable, canSignalTimetable, or linMessageTimetable.

references/lin-decode.md

View on GitHub
# LIN Decode: linMessageTimetable

For function syntax, run `help linMessageTimetable` in MATLAB.

Requires R2025a+.

## Pipeline

```matlab
linDb = linDatabase("network.ldf");
linMsgs = linMessageTimetable(tt, linDb);
```

## linMessageTimetable Behavior

Converts raw LIN data (from mdfRead or blfread) into a decoded LIN message timetable.

Returns a timetable with columns: `ID`, `Name`, `Data`, `Length`, `Signals`, `ErrorType`, `ChecksumType`, `Checksum`.

## Signal Access (No Separate Signal Function)

Unlike CAN (which has `canMessageTimetable` -> `canSignalTimetable`), LIN decode stops at `linMessageTimetable`. There is no further decode step.

Signal values are accessed from the `Signals` column of the decoded timetable:

```matlab
linMsgs = linMessageTimetable(tt, linDb);
sigValues = linMsgs.Signals{rowIdx};
% Returns struct: sigValues.SignalName1, sigValues.SignalName2, etc.
```

## Extracting All Signals Into Timetables

To extract signals into a more usable format similar to canSignalTimetable output:

```matlab
linMsgs = linMessageTimetable(tt, linDb);
msgNames = unique(linMsgs.Name);
signals = struct();
for i = 1:numel(msgNames)
    msgName = msgNames(i);
    rows = linMsgs(linMsgs.Name == msgName, :);
    if isempty(rows) || isempty(rows.Signals{1})
        continue
    end
    sigFields = fieldnames(rows.Signals{1});
    sigData = timetable(rows.Time);
    for j = 1:numel(sigFields)
        vals = cellfun(@(s) s.(sigFields{j}), rows.Signals);
        sigData.(sigFields{j}) = vals;
    end
    signals.(matlab.lang.makeValidName(msgName)) = sigData;
end
```

## Database Compatibility

`linMessageTimetable` accepts only `linDatabase` (LDF files). It does **not** accept `canDatabase` or `arxmlDatabase`.

## Source Data

LIN raw data can come from:
- **BLF files:** `blfread(f, Database=linDb, ProtocolMode="LIN")`
- **MDF files:** `mdfRead(f, GroupNumber=g)` where the group contains `LIN_Frame.*` channels

See [BLF import](blf-import.md) and [MDF import](mdf-import.md) for details on reading from each format.

----

Copyright 2026 The MathWorks, Inc.
deprecation-and-migrationaddyosmani/agent-skillsManages deprecation and migration. Use when removing old systems, APIs, or features. Use when migrating users from one implementation to another. Use when migrating a database schema in production, such as renaming or dropping a column without downtime (expand/contract). Use when deciding whether to maintain or sunset existing code.Stars: 119kUpdated Claude CodeCodexVerifiedInstall
performance-optimizationaddyosmani/agent-skillsOptimizes application performance across frontend, backend, queries, and databases. Use when performance requirements exist, when you suspect performance regressions, when Core Web Vitals or load times need improvement, when N+1 query patterns need fixing, or when profiling reveals bottlenecks.Stars: 119kUpdated Claude CodeCodexVerifiedInstall
Agent Cost Reportthedotmack/claude-memBelievable agent cost report for any period, default the last 7 full days PT, not counting today. Measured tokens from Claude Code transcripts priced at OpenRouter list prices (ESTIMATED), measured provider spend when a sanctioned source exists, note-taker cost separate, Timing-style HTML/PDF plus report.json, line-items.csv, evidence.json.Stars: 118kUpdated Claude CodeCodexVerifiedInstall
Agent Cost Reportthedotmack/claude-memBelievable agent cost report for any period, default the last 7 full days PT, not counting today. Measured tokens from Claude Code transcripts priced at OpenRouter list prices (ESTIMATED), measured provider spend when a sanctioned source exists, note-taker cost separate, Timing-style HTML/PDF plus report.json, line-items.csv, evidence.json.Stars: 118kUpdated Claude CodeCodexVerifiedInstall