Real-Time Auto-Scrolling Graph from Serial Port

It Plots a real-time running graph taking inputs from a serial port.

이 제출물을 팔로우합니다

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 (2026). Real-Time Auto-Scrolling Graph from Serial Port (https://kr.mathworks.com/matlabcentral/fileexchange/31857-real-time-auto-scrolling-graph-from-serial-port), MATLAB Central File Exchange. 검색 날짜: .

도움

도움 준 파일: LSP, TCPIP/Serial Data Live Plot Utility

카테고리

Help CenterMATLAB Answers에서 Animation에 대해 자세히 알아보기

일반 정보

MATLAB 릴리스 호환 정보

  • 모든 릴리스와 호환

플랫폼 호환성

  • Windows
  • macOS
  • Linux
버전 퍼블리시됨 릴리스 정보 Action
1.0.0.0