help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Octave criterion for matrix singularity


From: bewantbe
Subject: Re: Octave criterion for matrix singularity
Date: Tue, 26 Feb 2019 23:01:00 +0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.5.1

At each iteration I'm increasing the matrix order by one. At some point
Octave issues a warning:

   warning: matrix singular to machine precision, rcond = 1.56508e-17

You can search the source code by key words
  $ grep -IR 'matrix singular to machine precision'
This direct you to file "liboctave/util/lo-array-errwarn.cc" and function "warn_singular_matrix (double rcond)".

With this next key words, search by
$ grep -IR 'warn_singular_matrix'
get you to e.g. file "liboctave/array/dMatrix.cc" and the function "Matrix::fsolve".

One lesson I learn is: this "rcond" is actually (reciprocal) condition number of L1 (or L-infinity) norm, instead of the usual L2 norm. Thus it is easier and faster to compute (by LAPACK routine dgecon()). You can get this rcond by "rcond" function in Octave. And to my surprise, rcond() is much more capable to super-low reciprocal condition number compared to cond(), which is based on SVD. e.g. rcond(vander((1:50)/50))=1.4262e-31, 1/cond(vander((1:50)/50))=4.8811e-20 (which is well under estimated).




reply via email to

[Prev in Thread] Current Thread [Next in Thread]