Plot straight line between points
조회 수: 20 (최근 30일)
이전 댓글 표시
Hi everybody,
I'm trying to plot something like this, but just for a number of datapoints.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/289727/image.jpeg)
But keep on getting something like this instead:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/289728/image.jpeg)
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에서 Annotations에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!