I wrote a program (witch is available in the attachment) to calculate a
variable( 'w' in the program) by calculating determinate of a matrix (witch
include the variable) equal to zero. but I don't know why it doesn't work
for l=0.01 and work for l=0.0.
I use version 7.4.1 of Sympy.
--
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 post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sympy.
To view this discussion on the web visit
https://groups.google.com/d/msgid/sympy/c7db5bb4-b86a-4769-89c7-ebb2eba8efd1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
from sympy import *
import random as ra
w = Symbol('w')
l=0.01
d1=ra.uniform(-l,l)
d2=ra.uniform(-l,l)
d3=ra.uniform(-l,l)
d4=ra.uniform(-l,l)
d5=ra.uniform(-l,l)
d6=ra.uniform(-l,l)
S = Matrix([[ -d1*w**2 - w**2 + 2.,-1,0,0,0],
[-1.,-d2*w**2 - w**2 + 2.,-1,0,0],
[0,-1.,-d3*w**2 - w**2 + 2.,-1,0],
[0,0,-1.,-d4*w**2 - w**2 + 2.,-1],
[0,0,0,-1.,-d5*w**2 - w**2 + 2.]
])
determ = S.berkowitz_det()#Computes determinant using Berkowitz method.
wha = solve(determ,w)
print wha