plot two graphs in real time

I'm tring to plot tow graphs ( data & y ) in the same figure in real time , but i don't know how to set the xdata & ydata for them , all what i know is for one graph : set(plotGraph,'XData',time,'YData',data); i want to plot both data & y in function of time

3 个评论

What do you mean by real time?
matlab recieve data from a PIC µc & plot it
Did you manage to solve this? I'm having the same problem here...

请先登录,再进行评论。

回答(1 个)

Maybe "plotyy" works for you. In this way, you have two graphs in one figure.
plotyy(time,y,time,data)
%plots "time" versus "y" with y-axis and plots "time" versus "data" with y-axis.
You can type this on Command Window to read more about.
doc plotyy

1 个评论

kheirou
kheirou 2013-10-6
编辑:kheirou 2013-10-6
What about "set function" , how can i plot two graphs ?

请先登录,再进行评论。

类别

帮助中心File Exchange 中查找有关 Two y-axis 的更多信息

标签

提问:

2013-10-6

评论:

Ana
2015-2-12

Community Treasure Hunt

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

Start Hunting!

Translated by