# HG changeset patch # User jwe # Date 757155387 0 # Node ID 5f18dd3a9b6156de8756b0aa7779eb70bf42676d # Parent 48f2876fc8074b5ae66a70adc8f09480341348d4 [project @ 1993-12-29 08:55:02 by jwe] diff -r 48f2876fc807 -r 5f18dd3a9b61 scripts/linear-algebra/rank.m --- a/scripts/linear-algebra/rank.m Wed Dec 15 07:44:13 1993 +0000 +++ b/scripts/linear-algebra/rank.m Wed Dec 29 08:56:27 1993 +0000 @@ -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)");