-1

I have matrices A which have unknown variables and have a solution matrices B.Now I have to find unknown variables by doing A=B. How I can do this through python?

   [sin⁡(f)cos⁡(e) sin⁡(d)sin⁡(e)cos⁡(f)−sin⁡(f)cos⁡(d)  sin⁡(d)sin⁡(f)+sin⁡(e)cos⁡(d)cos⁡(f)   0]  
A= [sin⁡(f)cos⁡(e) sin⁡(d)sin⁡(e)sin⁡(f)+cos⁡(d)cos⁡(f) −sin⁡(d)cos⁡(f)+sin⁡(e)sin⁡(f)cos⁡(d)   0]
   [−sin⁡(e)      sin⁡(d)cos⁡(e)                     cos⁡(d)cos⁡(e)                      0] 
   [0             0                                0                                1]

   [0.23 -0.45 1.6 0]
B= [0.8   1.7  1.4 0]
   [0.43  0.72 0.6 0]
   [0     0.   0.  1] 

A = B
Mad Physicist
  • 107,652
  • 25
  • 181
  • 264
  • 1
    This is very abstract. Why not solve by hand? You know `sin(e)`, and therefore `e`. Any other element in the second-to-last row therefore gives you `d`, while the first column gives you `f`. – Mad Physicist Feb 09 '20 at 16:47
  • The Orginal Equation is more complex, this is part of Robotics and Automation Inverse Kinematics. – Siddharth Singh Feb 10 '20 at 09:14
  • That doesn't help any. You could try sympy, but you can't reasonably expect an answer tailored to your needs if you don't present an example of what you actually want (and the research you've done so far). – Mad Physicist Feb 10 '20 at 09:20
  • I just want to know that there is some function of Sympy which can calculate it and give me the answer of unknown variables – Siddharth Singh Feb 10 '20 at 09:34

1 Answers1

1

How about SymPy? Their solver looks like what you need.

In this question, you'll find other relevant resources.

You can find examples in SymPy documentation and in the SymPy Github project.

Good luck!

Yanirmr
  • 923
  • 8
  • 25