syms theta x y theta1 x1 y1
A=[cos(theta1) sin(theta1) x1
-sin(theta1) cos(theta1) y1
0 0 1]
B=[cos(theta) sin(theta) x
-sin(theta) cos(theta) y
0 0 1]
C=simplify(A^(-1)*B)
syms theta x y theta1 x1 y1
A=[cos(theta1) sin(theta1) x1
-sin(theta1) cos(theta1) y1
0 0 1]
B=[cos(theta) sin(theta) x
-sin(theta) cos(theta) y
0 0 1]
C=simplify(A^(-1)*B)