Mercurial > hg > octave-nkf
diff scripts/linear-algebra/rank.m @ 262:5f18dd3a9b61
[project @ 1993-12-29 08:55:02 by jwe]
author | jwe |
---|---|
date | Wed, 29 Dec 1993 08:56:27 +0000 |
parents | 16a24e76d6e0 |
children | 3470f1e25a79 |
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)");