Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there an equivalent to matlab's rcond() function in Julia?

Tags:

julia

I'm porting some matlab code that uses rcond() to test for singularity, as also recommended here (for matlab singularity testing).

I see that there is a cond() function in Julia (as also in Matlab), but rcond() doesn't appear to be available by default:

ERROR: rcond not defined

I'd assume that rcond(), like the Matlab version is more efficient than 1/cond(). Is there such a function in Julia, perhaps using an add-on module?

like image 860
Peeter Joot Avatar asked Feb 05 '15 02:02

Peeter Joot


1 Answers

Julia calculates the condition number using the ratio of maximum to the minimum of the eigenvalues (got to love open source, no more MATLAB black boxs!)

Julia doesn't have a rcond function in Base, and I'm unaware of one in any package. If it did, it'd just be the ratio of the maximum to the minimum instead. I'm not sure why its efficient in MATLAB, but its quite possible that whatever the reason is it doesn't carry though to Julia.

like image 115
IainDunning Avatar answered Oct 02 '22 23:10

IainDunning