Current location - Training Enrollment Network - Mathematics courses - How to use matlab to realize the rotation of coordinates around the origin 15 to get new coordinates?
How to use matlab to realize the rotation of coordinates around the origin 15 to get new coordinates?
Does it rotate on a plane?

Let the original coordinates be x 1 and y 1 and the rotation angle a be counterclockwise, then the new coordinates are

x2 = x 1*cos(a)? - y 1*sin(a)

y2 = x 1 * sin(a)+y 1 * cos(a)

For example:

x 1 = 3; y 1 = 4;

a = 15 * pi/ 180;

y2? =? x 1*sin(a)? +? y 1*cos(a)

x2? =? x 1*cos(a)? -? y 1*sin(a)