Distance from points to points.
古いコメントを表示
If I have this variable:
cord_new =
0.7000 0.4000
0.4500 0.3700
0.1000 0.6000
[righe, colonne]=size(cord_new)
gplot(ones(righe), cord_new, '-bs');
How can I plot the first value of cord_new with the second value of cord_new and the third value of cord_new. The important thing is that the first element is always fixed.
1 件のコメント
Image Analyst
2014 年 2 月 8 日
It's a 2D array, so exactly which element do you consider to be the third value? 0.1 (going down the row), or 0.45 (going across first, then down)?
採用された回答
その他の回答 (1 件)
Francesco
2014 年 2 月 8 日
0 投票
2 件のコメント
Image Analyst
2014 年 2 月 8 日
編集済み: Image Analyst
2014 年 2 月 8 日
So get rid of the bar chart. I only did it because you said you want to "plot the distance of the first to the second, the first to the third and so" and so I plotted the distances like you asked at first. Distance is computer via the Pythagorean theorem - not sure if you have a different definition than the rest of us. Maybe you meant "path" or "connecting line"??? If you don't want the distances anymore and only want the connecting lines, then get rid of all subplots and the call to bar and its labels and titles. And like I said, you can use whatever colors you want. You don't have to use rand(1,3) to get a random color like I did.
Francesco
2014 年 2 月 9 日
カテゴリ
ヘルプ センター および File Exchange で Creating, Deleting, and Querying Graphics Objects についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
