create a line between two points on an already made plot
7 ビュー (過去 30 日間)
古いコメントを表示
Dimitris Arapidis
2013 年 9 月 5 日
回答済み: Abhishekkumar Shingala
2020 年 12 月 29 日
I have matrices x and y and make a plot with them. x=[0,...,85.8024]; (100 numbers) y=[0.8736,...,1.2157];(100 numbers) figure plot(x,y)
i want to create a line from A=(0,0.8736) to B=(85.8024,1.2157) on the same plot (red color).
0 件のコメント
採用された回答
Azzi Abdelmalek
2013 年 9 月 5 日
add
hold on
plot([0 85.8024],[0.8736 1.2157],'r')
2 件のコメント
Adam Fitchett
2019 年 10 月 23 日
編集済み: Adam Fitchett
2019 年 10 月 23 日
Hi, I know this is a long time after the reply was written, but...
I tried this method and it drew the line between the two points, but after the second point the line veers at a seemingly random angle and then goes off into the distance. How do you draw the line so that it is just between the two points and doesn’t carry on after?
その他の回答 (1 件)
Abhishekkumar Shingala
2020 年 12 月 29 日
Can we create smooth line (curve) between two points?
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Scatter Plots についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!