Hello, 
I have the following minimal working example for solving a system of 
simultaneous non-linear equations. Angles, ang_xs, ang_ys, and ang_zs are 
dynamic in nature but for this particular instant, I am trying to solve A = 
[0, 0, 0]^T. This returns an error "can't convert oo to int". Could anyone 
suggest a solution please? Also, is there a way to set anything less than 
1e-6 to be zero?

from sympy import *
from sympy.physics.mechanics import *


ang_xs, ang_ys, ang_zs = dynamicsymbols("ang_xs ang_ys ang_zs ")
A = Matrix( [
                 [1.005e-14*sin(ang_zs + pi/4)*cos(ang_ys)],
                 [1.005e-14*sin(ang_zs + pi/4)*sin(ang_xs)*sin(ang_ys) - 
1.005e-14*cos(ang_zs + pi/4)*cos(ang_xs)],
                 [-1.005e-14*sin(ang_zs + pi/4)*sin(ang_ys)*cos(ang_xs) - 
1.005e-14*sin(ang_xs)*cos(ang_zs + pi/4)]
                 ])
p = (ang_xs, ang_ys, ang_zs)
eq1, eq2, eq3 = Eq(A[0]), Eq(A[1]), Eq(A[2])
ang_xs, ang_ys, ang_zs = solve([eq1, eq2, eq3], p)


Thanks
Ash

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sympy/f1cbbc4f-ff1c-4410-bea1-7a3b3cb9676e%40googlegroups.com.

Reply via email to