matlab plot 2 vectors
显示 更早的评论
hello!
i have X and Y data. if i plot it i get an open curve, but want to obtain a closed curve and so i do
XX=[X(end) X];
YY=[Y(end) Y];
plot(XX,YY,'r-')
is there a more elegant way to do it? i can't find a better solution...
thank you so much!
采纳的回答
更多回答(1 个)
Azzi Abdelmalek
2012-10-4
编辑:Azzi Abdelmalek
2012-10-4
not different from yours
plot([x x(1)],[y y(1)],'r-')
3 个评论
Azzi Abdelmalek
2012-10-4
maybe if you specify how to close the curve? because like this, it is a line
joo
2012-10-4
joo
2012-10-4
类别
在 帮助中心 和 File 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!