How do I get the angle between three points input by ginput() in appdesigner?
1 回表示 (過去 30 日間)
古いコメントを表示
[x, y] = ginput(3);
app.UIFigure.HandleVisibility = fhv;
x = round(x);
y = round(y);
I received the input with ginput(), but I don't know how to convert it to angle.
(R2022b)
0 件のコメント
採用された回答
David Hill
2022 年 11 月 30 日
編集済み: David Hill
2022 年 11 月 30 日
z=[x,y];
d=diff(z);
Angle=acos(dot(-d(1,:),d(2,:))/norm(d(1,:))/norm(d(2,:)));
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Data Exploration についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!