Mercurial > hg > octave-lojdl
changeset 1065:5eeb61cac52e
[project @ 1995-01-25 14:04:13 by jwe]
author | jwe |
---|---|
date | Wed, 25 Jan 1995 14:06:23 +0000 |
parents | 32ff7b6638a0 |
children | ed077e7b5bcb |
files | scripts/linear-algebra/null.m scripts/linear-algebra/orth.m scripts/linear-algebra/trace.m |
diffstat | 3 files changed, 20 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/linear-algebra/null.m +++ b/scripts/linear-algebra/null.m @@ -34,7 +34,13 @@ [rows, cols] = size (A); - s = diag (S); + [S_nr, S_nc] = size (S); + + if (S_nr == 1 || S_nc == 1) + s = S(1); + else + s = diag (S); + endif if (nargin == 1) tol = max (size (A)) * s (1) * eps;