numpy (matrix solver) - python vs. matlab

someone newsboost at gmail.com
Thu May 3 13:30:35 EDT 2012


On 05/02/2012 11:45 PM, Russ P. wrote:
> On May 2, 1:29 pm, someone<newsbo... at gmail.com>  wrote:
>
>>> If your data starts off with only 1 or 2 digits of accuracy, as in your
>>> example, then the result is meaningless -- the accuracy will be 2-2
>>> digits, or 0 -- *no* digits in the answer can be trusted to be accurate.
>>
>> I just solved a FEM eigenvalue problem where the condition number of the
>> mass and stiffness matrices was something like 1e6... Result looked good
>> to me... So I don't understand what you're saying about 10 = 1 or 2
>> digits. I think my problem was accurate enough, though I don't know what
>> error with 1e6 in condition number, I should expect. How did you arrive
>> at 1 or 2 digits for cond(A)=10, if I may ask ?
>
> As Steven pointed out earlier, it all depends on the precision you are
> dealing with. If you are just doing pure mathematical or numerical
> work with no real-world measurement error, then a condition number of
> 1e6 may be fine. But you had better be using "double precision" (64-
> bit) floating point numbers (which are the default in Python, of
> course). Those have approximately 12 digits of precision, so you are
> in good shape. Single-precision floats only have 6 or 7 digits of
> precision, so you'd be in trouble there.
>
> For any practical engineering or scientific work, I'd say that a
> condition number of 1e6 is very likely to be completely unacceptable.

So how do you explain that the natural frequencies from FEM (with 
condition number ~1e6) generally correlates really good with real 
measurements (within approx. 5%), at least for the first 3-4 natural 
frequencies?

I would say that the problem lies with the highest natural frequencies, 
they for sure cannot be verified - there's too little energy in them. 
But the lowest frequencies (the most important ones) are good, I think - 
even for high cond number.





More information about the Python-list mailing list