matlab-import-export-vehicle-data

Import, decode, and export CAN, CAN FD, and LIN vehicle network log files in MATLAB.

995|122|Updated Apr 3, 2026
One-click install
npx skills add https://github.com/matlab/matlab-agentic-toolkit --skill matlab-import-export-vehicle-data
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: matlab-import-export-vehicle-data
Source: https://github.com/matlab/matlab-agentic-toolkit/tree/main/skills-catalog/test-and-measurement/matlab-import-export-vehicle-data
Command: npx skills add https://github.com/matlab/matlab-agentic-toolkit --skill matlab-import-export-vehicle-data

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Working with vehicle network log files in MATLAB is error-prone: read functions return polymorphic types, CAN FD cannot be decoded with ARXML databases, multiplexed signals need manual filtering, and export functions reject common data types. This Skill encodes the correct Vehicle Network Toolbox pipelines so an AI agent produces working import, decode, and export code on the first attempt.

Core Features & Use Cases

  • Log file import and decode: Read MDF/MF4/DAT, BLF, ASC, and TXT files and decode raw CAN, CAN FD, and LIN frames into signal timetables using DBC, ARXML, or LDF databases.
  • Export workflows: Write timetable data to MDF files with mdfWrite (including type conversion and ASAM channel naming) and CAN/CAN FD messages to BLF files with blfwrite.
  • Multiplexing handling: Detect extended or hierarchical multiplexing by parsing DBC text and apply simple demultiplexing by filtering signals on multiplexor values.
  • Use Case: An engineer receives a Vector BLF recording and a DBC file. The agent inspects channels with blfinfo, reads the data with blfread, decodes frames via canMessageTimetable and canSignalTimetable, and exports selected signals to an MF4 file.

Quick Start

Ask the agent to decode the attached BLF log file using the provided DBC database and plot the decoded CAN signals.

Frequently Asked Questions about matlab-import-export-vehicle-data

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I decode CAN messages from a BLF file in MATLAB?

Load the DBC with canDatabase, read the file with blfread using the Database argument, then call canMessageTimetable followed by canSignalTimetable. Without a ChannelID argument, blfread returns a cell array, so extract the channel timetable with result{1} first.

How do I write MATLAB timetable data to an MDF or MF4 file?

Use mdfWrite with the filename and timetable; the file is created automatically if missing. Convert unsupported types first: logical to uint8, categorical to double, and datetime columns to posixtime. Datetime RowTimes also need TimeZone set to UTC.

Can I decode CAN FD data with an ARXML database in MATLAB?

No. arxmlDatabase supports standard CAN only and cannot be used with canFDMessageTimetable or CAN FD data in BLF files. For CAN FD decoding you must use canDatabase with a DBC file instead.

Why does blfread return a cell array instead of a timetable?

Without a ChannelID argument, blfread returns a cell array with one timetable per channel for the selected protocol. Extract the desired channel with result{n} before decoding. Specifying ChannelID returns a single timetable directly.

Can I write LIN messages to a BLF file with Vehicle Network Toolbox?

No. blfwrite supports CAN and CAN FD only; writing LIN data to BLF is not supported. Use mdfWrite with the ASAM LIN_Frame column naming convention to log LIN data to MDF files instead.

How do I handle multiplexed CAN signals when decoding with a DBC file?

For simple multiplexing, decode with canSignalTimetable, then set multiplexed signal values to NaN in rows where the multiplexor value does not match the signal's MultiplexMode. Extended or hierarchical multiplexing, detected via SG_MUL_VAL_ entries in the DBC text, is not supported and those messages should be skipped.