matlab-import-export-vehicle-data
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, canSigna…
Install / Use
npx skills add matlab/matlab-agentic-toolkit --skill matlab-import-export-vehicle-dataInstalls into whichever agent you are using.
SKILL.md
Installable skill definition
Quality Score
Category
Data & AnalyticsSupported Platforms
Our assessment of matlab-import-export-vehicle-data
matlab-import-export-vehicle-data scores 91/100 on our quality scale, 192nd of 510 Data & Analytics skills we index (top 38%).
Its SKILL.md is 11 KB long, well organised into 15 sections with 5 code examples: a thorough specification that gives an agent plenty to work with.
With 1,098 GitHub stars, it is one of the more widely adopted skills in the catalogue.
Maintenance, license and trust
- The repository was last updated 18 days ago, so matlab-import-export-vehicle-data is actively maintained.
- No license is declared. By default that means all rights are reserved: you can read it, but reusing or redistributing it is not clearly permitted. Ask the author before building on it commercially.
- Its trust signals score 88/100, with 1 caution from licensing, adoption, age or documentation. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.
matlab-import-export-vehicle-data compared with similar skills
All 4 of these similar skills score higher than matlab-import-export-vehicle-data; compare them before choosing.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| matlab-import-export-vehicle-data (this skill)by matlab | 91 | 1.1k | 18d ago | SKILL.md |
| algorithmic-artby anthropics | 100 | 177.9k | 11d ago | SKILL.md |
| pptxby anthropics | 100 | 177.9k | 11d ago | SKILL.md |
| designby nextlevelbuilder | 100 | 130.2k | 12d ago | SKILL.md |
| ui-ux-pro-maxby nextlevelbuilder | 100 | 130.2k | 12d ago | SKILL.md |
Frequently asked questions
- How do I install matlab-import-export-vehicle-data?
- Run
npx skills add matlab/matlab-agentic-toolkit --skill matlab-import-export-vehicle-data. The install tabs above show the steps for each supported agent. - Which AI agents does matlab-import-export-vehicle-data work with?
- It is written for Universal, as a SKILL.md file. Other agents that read the same format can often use it too.
- Is matlab-import-export-vehicle-data safe to use?
- It declares no license and scores 88/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
- Is matlab-import-export-vehicle-data still maintained?
- The repository was last updated 18 days ago, so matlab-import-export-vehicle-data is actively maintained.
Skill content
View source on GitHubname: matlab-import-export-vehicle-data description: 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. license: https://www.mathworks.com/content/dam/mathworks/license/pmrl/license.md metadata: author: MathWorks version: "1.3"
Import, Export, and Decode Vehicle Data
Import, decode, and export vehicle network log files in MATLAB using Vehicle Network Toolbox (VNT).
When to Use
- Reading
.mf4/.mdf/.dat,.blf,.asc, or.txtvehicle bus log files - Decoding raw CAN/CAN FD frames to signals via DBC or ARXML databases
- Demultiplex signals from raw CAN/CAN FD frames via DBC databases in the case of simple multiplexing (R2026a or earlier)
- Decoding LIN frames via LDF databases (R2025a+)
- Handling polymorphic return types from VNT read functions
- Writing MATLAB timetable data to MDF/MF4 files with
mdfWrite - Writing CAN/CAN FD message data to BLF files with
blfwrite - Converting unsupported timetable types (logical, categorical, cell, datetime columns) for MDF export
When Not To Use
- Simulink CAN configuration
- Live CAN channel access
- XCP/A2L workflows
- Demultiplexing of signals in the case of hierarchical or extended multiplexing
- Demultiplexing of signals via ARXML or LIN databases
- Writing LIN data to BLF (unsupported by VNT's
blfwrite-- use MDF instead) - Writing to ASC or TXT files (no
canMessageExportexists -- use BLF or MDF instead)
Prerequisites
Before running any operations, determine the MATLAB version:
r = matlabRelease;
tok = regexp(r.Release, 'R(\d{4})([ab])', 'tokens');
matlabYear = str2double(tok{1}{1});
matlabLetter = tok{1}{2};
Before calling BLF/ASC/TXT import or CAN/CAN FD/LIN decode functions, call detect_matlab_toolboxes to confirm Vehicle Network Toolbox is installed. If unavailable, tell the user. Once confirmed in a session, do not re-check.
MDF functions (mdfRead, mdfChannelGroupInfo, mdfInfo, mdfChannelInfo) are base MATLAB (R2023a+) and do not require VNT. Do not use the deprecated mdf() object constructor -- always use the functional API. For reading all groups blindly, mdfRead alone is acceptable. To selectively read or inspect structure first, use mdfChannelGroupInfo or mdfInfo.
For R2026a and earlier, multiplexing is not natively supported in Vehicle Network Toolbox. Apply the demultiplexing modifications described below to decoded signals.
Decode Pipeline
| Source Format | CAN | CAN FD | LIN | Raw (no decode) |
|---------------|-----|--------|-----|-----------------|
| ASC | canSignalImport(f,"Vector",db) | same | -- | canMessageImport(f,"Vector",OutputFormat="timetable") |
| TXT | canSignalImport(f,"Kvaser",db) | same | -- | canMessageImport(f,"Kvaser",OutputFormat="timetable") |
| BLF | blfread(f,Database=db) -> canSignalTimetable | blfread(f,Database=db) -> canFDMessageTimetable -> canSignalTimetable | blfread(f,Database=linDb,ProtocolMode="LIN") -> linMessageTimetable | blfread(f) |
| MDF/MF4/DAT | mdfRead -> canMessageTimetable(tt,db) -> canSignalTimetable | mdfRead -> canFDMessageTimetable(tt,db) -> canSignalTimetable | mdfRead -> linMessageTimetable(tt,linDb) | mdfRead -> timetable directly |
Database Loading
db = canDatabase("path/to/file.dbc"); % CAN and CAN FD
db = arxmlDatabase("path/to/file.arxml"); % CAN only (not CAN FD)
linDb = linDatabase("path/to/file.ldf"); % LIN (R2025a+)
Load once, pass to all decode calls. Multiple databases: canMessageTimetable(tt, [db1, db2]).
Database inspection for DBC files and classification of the multiplexing scheme
In case of DBC files only, determine whether the file contains definitions of multiplexed signals that use extended or hierarchical multiplexing.
For MATLAB R2026a or earlier, it is not possible to determine the multiplexing scheme from the canDatabase object directly. Therefore, inspect the raw DBC text to classify the multiplexing scheme, by
reading the DBC file as text using fileread():
dbcText = fileread("path/to/file.dbc");
Check for extended multiplexing indicators. See references/dbc-multiplexing-syntax.md for the full syntax guide — consult it when parsing unfamiliar DBC signal markers or SG_MUL_VAL_ entries.
hasSgMulValEntries = ~isempty(regexp(dbcText, '^SG_MUL_VAL_\s+\d+', 'once', 'lineanchors'));
hasNestedMuxor = ~isempty(regexp(dbcText, 'SG_\s+\w+\s+m\d+M\s', 'once'));
hasExtendedMux = hasSgMulValEntries || hasNestedMuxor;
Note: SG_MUL_VAL_ may appear in the NS_ (namespace) section as a keyword declaration — this does NOT indicate extended multiplexing. Only match actual data entries that start at the beginning of a line followed by a numeric message ID.
If hasExtendedMux is true, identify which specific messages are affected by parsing the message IDs from SG_MUL_VAL_ entries:
sgMulValMsgIds = regexp(dbcText, '^SG_MUL_VAL_\s+(\d+)', 'tokens', 'lineanchors');
extendedMuxMsgIds = unique(cellfun(@(x) str2double(x{1}), sgMulValMsgIds));
For R2026a and earlier, filter out messages with extended multiplexing (identified in extendedMuxMsgIds) and inform the user.
Key Constraints
- Polymorphic returns: All VNT read functions (
canSignalImport,blfread,mdfRead,canMessageImport) return different types based on channel count and parameters. Always guard withiscell()/istimetable()/isstruct(). When checking multi-channel results, useiscell()as the primary guard to branch between cell array (multi-channel) vs direct timetable (single channel), then iterate or extract with{n}or{i}. - ARXML + CAN FD:
arxmlDatabasedoes not support CAN FD in MATLAB. It cannot be used withcanFDMessageTimetable. When the user provides an ARXML file for CAN FD data, always explain that ARXML does not support CAN FD and they must usecanDatabasewith a DBC file instead. Do not silently switch to DBC without explaining why. - ARXML for CAN (non-FD): When the user provides an ARXML file for standard CAN decode, use
arxmlDatabaseexclusively. Do not also loadcanDatabaseas a fallback -- the ARXML database object works identically incanMessageTimetableandcanSignalTimetable. Only usecanDatabasewhen the user provides a DBC file. - No
canFDSignalTimetable: This function does not exist. UsecanSignalTimetablefor both CAN and CAN FD signals. - BLF LIN requires
ProtocolMode="LIN": Without it,blfreadreturns only CAN data. - No signal-level LIN decode: Only
linMessageTimetableexists. Access signal values from timetable columns directly. - MDF raw CAN detection: Use channel name prefixes
CAN_DataFrame/LIN_Frame(ASAM standard). NEVER useSourceBusTypeorAcquisitionSourceTypemetadata -- not even as a fallback. These fields are vendor-specific and unreliable. canMessageImportdefault format: Returns legacycan.Messagearray. Always passOutputFormat="timetable".- Cell extraction: Multi-channel calls to
blfread,mdfRead, andcanMessageImportreturn cell arrays. Extract with{n}before processing. - Use
canSignalImportfor ASC/TXT signals: It decodes in one call. Only usecanMessageImportwhen raw message timetables are needed.
File-Specific References
- ASC import --
canSignalImport/canMessageImportwith Vector and Kvaser vendors, polymorphic return type handling for multi-channel files - BLF import --
blfinfofor file inspection,blfreadwith and without ChannelID, CAN vs LIN protocol selection - MDF import --
mdfRead/mdfChannelGroupInfo/mdfChannelInfo, detecting raw CAN/LIN groups by channel name, reading specific groups
Protocol References
- CAN decode --
canMessageTimetableandcanSignalTimetablepipelines, DBC and ARXML database usage - CAN FD decode --
canFDMessageTimetablepipeline, why ARXML does not work for CAN FD - LIN decode --
linMessageTimetableusage, accessing signal values from timetable columns (no signal-level function exists) - Database objects --
canDatabasevsarxmlDatabasevslinDatabase, which decode functions accept which database type
Demultiplexing References
- Simple demultiplexing --
canDatabase,canMessageTimetable,canFDMessageTimetable,canSignalTimetablepipelines and signal demultiplexing
Export Workflows
MDF Writing
Writing MATLAB timetable data to MDF/MF4 files with mdfWrite.
| Task | Function | Notes |
|------|----------|-------|
| Write timetable to new file | mdfWrite(file, tt) | Appends channel group; file created with warning if missing |
| Overwrite existing group | mdfWrite(file, tt, GroupNumber=N) | Must read with IncludeMetadata=true first |
| Set file metadata | mdfCreate(file, FileInfo=minfo) then mdfWrite() | Supported: Author, Department, Project, Subject, Comment |
| Convert unsupported types | See references/mdf-writing.md | logical -> uint8(), categorical -> double() (stores category index), cell -> string(), datetime col -> posixtime() |
| Write raw CAN frames | Use CAN_DataFrame.ID/DLC/DataLength/DataBytes column naming (ASAM standard) | All 4 columns mandatory (ID, DLC, DataLength, DataBytes). Omitting any one breaks canMessageTimetable re-import. |
| Write raw LIN frames | Use LIN_Frame.ID/ReceivedDataByteCount/DataLength/DataBytes column naming | ASAM standard LIN frame naming |
| Handle datetime RowTimes | Required step: Set .TimeZone = 'UTC' before writing: tt.Properties.RowTimes.TimeZone = 'UTC'; | Alternatively convert to duration -- both work. Omitting this causes mdfWrite to error or produce unreadable timestamps. |
BLF Writing
Writing CAN and CAN FD message data to BLF files with blfwrite.
| Task | Function | Notes |
|------|----------|-------|
| Write CAN messages | blfwrite(file, tt, chanID, 'CAN') | Use canMessageTimetable to format tt; do not manually build columns |
| Write CAN FD messages | blfwrite(file, tt, chanID, 'CAN FD') | Use canFDMessageTimetable to format tt; up to 64-byte payloads. See references/blf-writing.md for the 13 required columns when building from scratch. |
| CAN/CAN FD mixed | Both supported in one BLF file | Use explicit protocol string per call |
LIN is not supported by VNT's blfwrite. Use MDF for LIN logging. When the user asks to write LIN data to BLF, state this limitation immediately -- do not attempt workarounds or partial solutions before explaining the constraint.
ASC/TXT writing is not supported. There is no canMessageExport counterpart to canMessageImport. Use BLF or MDF for export.
Export References
- MDF writing --
mdfWrite/mdfCreate, type conversion, ASAM CAN/LIN naming, overwriting groups, metadata preservation - BLF writing --
blfwritewith CAN/CAN FD,canMessageTimetable/canFDMessageTimetableformatting, channel callbacks
Copyright 2026 The MathWorks, Inc.
Related Skills
algorithmic-art
177.9kCreating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code, generative art, algorithmic art, flow fields, or particle systems.
pptx
177.9kUse this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or presentations; reading, parsing, or extracting text from any .pptx or .potx file (even if the extracted content will be used elsewhere, like in an em…
design
130.2kComprehensive design skill: brand identity, design tokens, UI styling, logo generation (55 styles, Gemini, Atlas Cloud, or MuAPI AI), corporate identity program (50 deliverables, CIP mockups), HTML presentations (Chart.js), banner design (22 styles, social/ads/web/print), icon design (15 styles, SVG…
ui-ux-pro-max
130.2kUI/UX design intelligence for web, mobile, and desktop. This skill should be used when designing, building, reviewing, or fixing interfaces, including pages, components, design systems, accessibility, interaction, responsive layout, typography, color, charts, and stack-specific UI implementation.
Languages
Trust signals
From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.
