Real-Time Auto-Scrolling Graph from Serial Port

版本 1.0.0.0 (1.2 KB) 作者: Shashank
It Plots a real-time running graph taking inputs from a serial port.
4.0K 次下载
更新时间 2011/6/18

查看许可证

This script takes input from the Serial port 'COM4' with the baud rate of 19200 and plots a running graph with the X-axis range of 200.

I used it for my IMU sensor so the input is in the form of strings '<accX accY accZ>' (eg:- '381 328 420'), you can also add the gyro readings to it. I run the loop to 1000 iterations you can modify to suit your purpose. A better solution i will try later is to take the time inputs from your device(i used Arduino so i will possibly use micros()) to get exact time related outputs.

It is a bit slow due to the usage of 'drawnow' but i'll try it with other methods and post a better version soon.

I haven't commented it nicely cause i think the code is fairly self-explanatory.

引用格式

Shashank (2024). Real-Time Auto-Scrolling Graph from Serial Port (https://www.mathworks.com/matlabcentral/fileexchange/31857-real-time-auto-scrolling-graph-from-serial-port), MATLAB Central File Exchange. 检索来源 .

MATLAB 版本兼容性
创建方式 R2011a
兼容任何版本
平台兼容性
Windows macOS Linux
类别
Help CenterMATLAB Answers 中查找有关 Animation 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
版本 已发布 发行说明
1.0.0.0