フィルターのクリア

Connecting points in a scatter plot and measuring the angle

1 回表示 (過去 30 日間)
Zo
Zo 2019 年 3 月 4 日
コメント済み: Zo 2019 年 3 月 6 日
Good afternoon,
the attached image is what is obtained when i ran this progam.
How do i connect the points and find the angle between them
thank you.
I = imread ('MR.png')
imshow (I)
disp('Click the mouse wherever in the figure; press ENTER when finished.');
mousePointCoords = ginput;
% plot the mouse point coordinates on the figure
plot(mousePointCoords(:,1), mousePointCoords(:,2),'b.','MarkerSize',8);

採用された回答

KSSV
KSSV 2019 年 3 月 5 日
編集済み: KSSV 2019 年 3 月 5 日
For points (x1,y1) and (x2,y2) use atan2(y2-y1,x2-x1) to get angle.
Use plot to plot them as a line.

その他の回答 (0 件)

カテゴリ

Help Center および File Exchange2-D and 3-D Plots についてさらに検索

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by