MATLAB Answers

0

2d Coordinate rotation in clockwise direction

Asked by Reuben Addison on 18 Jan 2019
Latest activity Commented on by Reuben Addison on 18 Jan 2019
Accepted Answer by KSSV
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.

  0 Comments

Sign in to comment.

Tags

Products


Release

R2018a

2 Answers

Answer by KSSV
on 18 Jan 2019
 Accepted Answer

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

  0 Comments

Sign in to comment.


Answer by Reuben Addison on 18 Jan 2019

I think this function rotates counter clockwise , any idea how I could make it clockwise

  1 Comment

Sign in to comment.