Mercurial > hg > octave-terminal
changeset 262:5f18dd3a9b61
[project @ 1993-12-29 08:55:02 by jwe]
author | jwe |
---|---|
date | Wed, 29 Dec 1993 08:56:27 +0000 |
parents | 48f2876fc807 |
children | 1ef675458060 |
files | scripts/linear-algebra/rank.m |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/linear-algebra/rank.m +++ b/scripts/linear-algebra/rank.m @@ -18,7 +18,7 @@ function retval = rank (A, tol) -# usage: rand (a, tol) +# usage: rank (a, tol) # # Return the rank of the matrix a. The rank is taken to be the number # of singular values of a that are greater than tol. @@ -34,6 +34,7 @@ sigma = svd (A); tolerance = max (size (A)) * sigma (1) * eps; elseif (nargin == 2) + sigma = svd (A); tolerance = tol; else error ("usage: rank (A)");