SerialIO mex
Version 1.3.0.0 (5.65 KB) by
Lorgio Teodovich
SerialIO is written in C and allows you to read/write to a serial or com port.
Although MATLAB is supposed to support both writing and reading data from the serial port, reading data seems to either produce no result, generate an error, or crash MATLAB. To remedy the situation SerialIO() has been written. This function will allow you to set/get vectors of data from the serial port buffer.
To help, type "SerialIO('help');
s = SerialIO('open','com2',19200);
SerialIO('write',x,3);
y=SerialIO('read',6);
SerialIO('close');
Note: to compile "mex SerialIO.cpp"
Cite As
Lorgio Teodovich (2026). SerialIO mex (https://www.mathworks.com/matlabcentral/fileexchange/25478-serialio-mex), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Created with
R13
Compatible with any release
Platform Compatibility
Windows macOS LinuxCategories
Find more on Use COM Objects in MATLAB in Help Center and MATLAB Answers
Tags
Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
