On 04/29/2012 07:59 PM, someone wrote:


 Also, as was said, do not use INV(A) directly to solve equations.

In Matlab I used x=A\b.


good.

I used inv(A) in python. Should I use some kind of pseudo-inverse or
what do you suggest?


I do not use python much myself, but a quick google showed that pyhton scipy has API for linalg, so use, which is from the documentation, the following code example

          X = scipy.linalg.solve(A, B)

But you still need to check the cond(). If it is too large, not good. How large and all that, depends on the problem itself. But the rule of thumb, the lower the better. Less than 100 can be good in general, but I really can't give you a fixed number to use, as I am not an expert in this subjects, others who know more about it might have better recommendations.

--Nasser



--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to