How to use the three points A1, A2, and B0 to calculate ∠A1B0A2?
1 回表示 (過去 30 日間)
古いコメントを表示

1 件のコメント
採用された回答
KSSV
2020 年 12 月 15 日
A1 = [171 422] ;
A2 = [415 413] ;
B0 = [277 386] ;
d1 = A1-B0 ;
d2 = A2-B0 ;
theta = atan((d2(2)-d1(2))/(d2(1)-d1(1)))
4 件のコメント
James Tursa
2020 年 12 月 17 日
@KSSV: Your solution produces the angle that the A2-A1 vector makes with the x-axis. It does not involve B0 at all. This does not seem to answer the question.
その他の回答 (1 件)
James Tursa
2020 年 12 月 17 日
編集済み: James Tursa
2020 年 12 月 17 日
A1 = [171 422] ;
A2 = [415 413] ;
B0 = [277 386] ;
d1 = A1-B0 ;
d2 = A2-B0 ;
theta = atan2( norm(cross([d1 0],[d2 0])), dot(d1,d2) );
See this link:
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Creating and Concatenating Matrices についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!