如何在 MATLAB 中绘制基本线图?
我有
a =
54.1848
50.0456
99.9748
83.1009
63.1457
91.7577
64.0805
48.2090
75.7711
t =
79.7077
31.0913
14.9389
10.8303
16.4844
26.8465
41.6946
77.3369
186.3246
如何在y轴
上使用a
和在x轴
上使用t
制作简单的线图?
plot (a,t)
给出
和 plot (t,a)
给出
我不明白它们是如何生成的。结果应该是别的东西。
I have
a =
54.1848
50.0456
99.9748
83.1009
63.1457
91.7577
64.0805
48.2090
75.7711
t =
79.7077
31.0913
14.9389
10.8303
16.4844
26.8465
41.6946
77.3369
186.3246
How can make a simple line plot with a
on y axis
and t
on x axis
?
plot (a,t)
gives
and plot (t,a)
gives
I don't understand how these are generated. The result should be something else.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
是最有效的方法。
或者,如果您真的不喜欢这些行,您可以简单地使用:
is the most efficient way to do this.
Or, if you don't really care for having the lines you can simply use:
我认为,如果您根据
t
中的值对两个向量进行排序,然后使用plot(t,a)
您将得到您想要的。I think that if you sort both vectors according to the values in
t
and then useplot(t,a)
you will get what you want.