octave-maintainers
[Top][All Lists]
Advanced

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

Re: tol in rank function


From: siko1056
Subject: Re: tol in rank function
Date: Sat, 22 Oct 2016 04:09:44 -0700 (PDT)

Hi,

Octave's [simplified rank function][1] is

s = svd (A);
tol = max (size (A)) * s(1) * eps;
r = sum (s > tol);

and [Matlab's][2]

s = svd(A);
tol = max (size(A)) * eps (max(s));  % effectively only "max (size(A)) * eps
('double')"
r = sum(s > tol);

So maybe Octave should revisit the default tolerance for matlab
compatibiliy. References I found go to the [SVD error bound estimation of
LAPACK][3] and [here][4] comes close to the Octave implementation using the
largest singular value.

Two other comprehensive sources for matrix computation I would look at are
[Golub & Van Loan 1996][5] or [Higham 2002][6].

Kai

[1]:
http://hg.savannah.gnu.org/hgweb/octave/file/tip/scripts/linear-algebra/rank.m
[2]: https://www.mathworks.com/help/matlab/ref/rank.html
[3]: http://www.netlib.org/lapack/lug/node96.html
[4]: http://www.netlib.org/lapack/lug/node97.html
[5]:
http://web.mit.edu/ehliu/Public/sclark/Golub%20G.H.,%20Van%20Loan%20C.F.-%20Matrix%20Computations.pdf
[6]:
http://servidor.demec.ufpr.br/CFD/bibliografia/Higham_2002_Accuracy%20and%20Stability%20of%20Numerical%20Algorithms.pdf



--
View this message in context: 
http://octave.1599824.n4.nabble.com/tol-in-rank-function-tp4680288p4680298.html
Sent from the Octave - Maintainers mailing list archive at Nabble.com.



reply via email to

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