2d Coordinate rotation in clockwise direction

4 ビュー (過去 30 日間)
Reuben Addison
Reuben Addison 2019 年 1 月 18 日
コメント済み: Reuben Addison 2019 年 1 月 18 日
How do I rotate a 2d coordinate about the origin in a clockwise direction, I have data points for the origin as [start_x = 24.000;
,start_y = 16.000] and target lorcation [target_x = 27.000,target_y = 16.000], but I want to rotate my target at an angle of 45 degrees clockwise about the origin and I am wondering if there is a way to get a function for the new target coodinates.

採用された回答

KSSV
KSSV 2019 年 1 月 18 日
th = pi/4 ;
R = [cos(th) -sin(th) ;sin(th) cos(th)] ;
Multiply your points with the above R. Read about rotation matrix: https://en.wikipedia.org/wiki/Rotation_matrix

その他の回答 (1 件)

Reuben Addison
Reuben Addison 2019 年 1 月 18 日
I think this function rotates counter clockwise , any idea how I could make it clockwise
  1 件のコメント
Reuben Addison
Reuben Addison 2019 年 1 月 18 日
Please ignore, got it

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeAnimation についてさらに検索

タグ

製品


リリース

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by