Multiple real time plots on multiple figures

조회 수: 12 (최근 30일)
Mjoy
Mjoy 2016년 4월 7일
답변: Steven Samuel 2020년 12월 11일
Hello all, greetings. I´m a beginner in Matlab. I want to plot real time graphs on matlab for 4 motors, the data being read from the serial port. The data from the serial port will contain certain parameters that I should extract and compute and plot graphs in real time. My front screen will have buttons for 4 motors. When i click on m1, it should display live graphs (read from the the serial port) and when i click on m2, the corresponding data for m2 needs to be plotted, simultaneous to m1 graphs on another figure. Is this possible? If yes, please give me an basic algorithm to follow. I can catch up from there. I appreciate any kind of help. Thanks a lot!

답변 (1개)

Steven Samuel
Steven Samuel 2020년 12월 11일
I know this is some 4 odd years too late but you can just do
figure(1),plot (x, y)
figure(2),plot (x, y)
if you have them inside a while loop they will work or you can alternatively add this line after each figure declaration:
drawnow

카테고리

Help CenterFile Exchange에서 Annotations에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by