How can I display multiple MatrixVB curves on the same MATLAB figure plot?
1 次查看(过去 30 天)
显示 更早的评论
How can I display multiple MatrixVB curves on the same MATLAB figure plot?
I am trying to generate more than one curve on a single plot. The reference manual says that (x,y,s) triplets may be repeated several times in one plot to put several curves in the same plot, but I can not get this to work. Can you provide me an exampe of how to list several (x,y,s) triplets in the parameter list?
采纳的回答
MathWorks Support Team
2009-6-27
The following sample MatrixVB application illustrates how to list several (x,y,s) triplets in the parameter list. The code produces a sine and cosine signal on the same plot by using the (x,y,s) triplet twice.
Private Sub Command1_Click()
x = colon(0, 0.1, 2 * 3.1415926)
Y1 = msin(x)
Y2 = mcos(x)
Call plot(x, Y1, "r", x, Y2, "b")
End Sub
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Thermodynamics & Statistical Physics 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!