Matlab plot: create a line b/w the points except the last one?
2 次查看(过去 30 天)
显示 更早的评论
Hey guys,
I have got this plot with some points, I want to only create a line between some of them. Let's say I don't want to connect the last point on the right of the plot, but I still want to have the point.
How do I do it?
Thanks
1 个评论
Jan
2011-12-5
It would be much easier to show the needed code, if you post a running example code, which produces your graphics except for the requested detail.
回答(2 个)
Fangjun Jiang
2011-12-5
x=1:10;
y=1:10;
plot(x(1:end-1),y(1:end-1));
hold on;
plot(x(end),y(end),'+');
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Annotations 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!