MATLAB: How to write equation a for X and Y

mathematics

How to write equation a for X and Y using the below image (how to obtain X and Y)

Best Answer

Try this:
xy = [xj-xi; yj-yi];
rotationMatrix = [cos(theta), sin(theta); sin(theta), -cos(theta)]
XY = rotationMatrix * xy;
X = XY(1);
Y = XY(2);
Related Question