1
$\begingroup$

My question is a continuation to a previous question. I have a matrix M which is a function of theta1, theta2, phi1 and phi2. Now, I want to get back these angles using the singular vectors (U and V) of an SVD ($U.W.V^{T}$). I want to start by taking a random matrix M and try to extract these angles by manipulating matrices U and V. I however took it a bit different way. I tried to come up with a combination of rotations T1 and T2 that gives a similar matrix as U and V but not exactly the same. So, I cannot equate them as I had initially thought. Here's my code:

M={{161.294, 11.3761, 60.498}, {-10.7667, -7.11777, 30.0436}, {-64.1061,
   29.8182, -15.9093}};

{U, W, V} = SingularValueDecomposition[M];
U
V

Uy[theta] = {{Cos[theta]],0,Sin[theta]},{0,1,0},{-Sin[theta],0,Cos[theta]}};
Uz[phi] = {{Cos[phi],-Sin[phi],0},{Sin[phi],Cos[phi],0},{0,0,1}};
T1 = Uy[theta1]
T2 = Uy[theta2].Uz[phi1].Uz[phi2]

Any help shall be highly appreciated.

$\endgroup$
2
  • $\begingroup$ Welcome to Mathematica.SE! I hope you will become a regular contributor. To get started, 1) take the introductory tour now, 2) when you see good questions and answers, vote them up by clicking the gray triangles, because the credibility of the system is based on the reputation gained by users sharing their knowledge, 3) remember to accept the answer, if any, that solves your problem, by clicking the checkmark sign, and 4) give help too, by answering questions in your areas of expertise. $\endgroup$
    – bbgodfrey
    Commented Jan 3, 2022 at 19:52
  • 1
    $\begingroup$ Avoid using MatrixForm (which is really just for pretty printing matrices) when you set variables like T1,T2, as this wraps a MatrixForm head around the expression and it won't work as expected in any future computations you do with these variables. $\endgroup$
    – flinty
    Commented Jan 3, 2022 at 22:29

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.