Plot straight line between points
64 次查看(过去 30 天)
显示 更早的评论
Hi everybody,
I'm trying to plot something like this, but just for a number of datapoints.

But keep on getting something like this instead:

I've tried using 'line' but doesn't work and also 'bo-' in the plot command. My code at the moment is:
xVal = [Ax, Bx, Cx];
yVal = [Ay, By, Cy];
plot(xVal, yVal,'bo-'), grid on, hold on
line(xVal, yVal)
Any help is appreciated thanks!
0 个评论
采纳的回答
Olawale Ikuyajolu
2020-5-2
编辑:Olawale Ikuyajolu
2020-5-2
Click here for the solution to similar problemClick here
更多回答(1 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Line Plots 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!