How to plot four variables value in XY graph

3 次查看(过去 30 天)
How to plot set of values like(x,y),,,,x=1:1:10 ,,,,,y=1:1:10,,,, and (x1,y1),,,x1=:30:1:40,,,,y1=30:1:40,,,,,in a single plot and my plot should plot one by one value,,,, It is something like two vehicles at two different postion and they are moving with step increment of one by one

采纳的回答

Muruganandham Subramanian
plot(x,y,'r*',x1,y1,'b-')
  5 个评论
Muruganandham Subramanian
编辑:Muruganandham Subramanian 2012-12-7
If the output values from simulink model is present in base workspace, it'll work
Arun Badigannavar
Arun Badigannavar 2012-12-7
I got it,,,assigned the values and plotting it,,,thanks for ur help

请先登录,再进行评论。

更多回答(1 个)

Harshit
Harshit 2012-12-7
use hold all after first plot.
  1 个评论
Arun Badigannavar
Arun Badigannavar 2012-12-7
for these given x values it works,,,but i have these four variables values coming from simulink models,,,so can i plot simulink model values step by step

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 2-D and 3-D Plots 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by