How can i measure the distance between points in a scatter graph
4 ビュー (過去 30 日間)
古いコメントを表示
Looking to measure the Manhattan distance between the points on my scatter graph
0 件のコメント
回答 (1 件)
José-Luis
2017 年 2 月 10 日
2 件のコメント
José-Luis
2017 年 2 月 10 日
You are trying to get the distance of a graphic object handle (in your case a line).
Perhaps this is what you meant:
x = [0, 6, 6, 6, 7, 7, 8, 8];
y = [0, 0, 2, -2, 2, -2, 2, -2];
D = pdist([x',y'],'cityblock')
Please read the documentation. Also, please accept the answer that best solves your problem.
参考
カテゴリ
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!