How can I open and read data from a serial port?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
To open/read pre-recorded data I have previously used:
fileID = fopen('filename.txt', 'rt'); line = fgetl(fileID);
to read the text file line by line. However, I need to be able to read data from an instrument connected to a serial port.
i have used
fid = serial(COMx,baudrate,9600);
fopen(fid);
Will this work for a live instrument?
0 Kommentare
Antworten (1)
Walter Roberson
am 24 Mai 2016
fid = serial('COMx', 'baudrate', 9600);
1 Kommentar
islam dib
am 9 Dez. 2020
hello,
Siehe auch
Kategorien
Mehr zu Standard File Formats finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!