Mercurial > octave-nkf
changeset 7616:fb4fa07bc364
more checks for subspace
author | Jaroslav Hajek <highegg@gmail.com> |
---|---|
date | Thu, 20 Mar 2008 12:06:07 -0400 |
parents | 25eacc0c2706 |
children | 9dca8b03dfe8 |
files | scripts/ChangeLog scripts/linear-algebra/subspace.m |
diffstat | 2 files changed, 4 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/ChangeLog Thu Mar 20 15:17:38 2008 +0100 +++ b/scripts/ChangeLog Thu Mar 20 12:06:07 2008 -0400 @@ -6,8 +6,8 @@ 2008-03-20 Jaroslav Hajek <highegg@localhost.localdomain> - * linear-algebra/subspace.m: Check number of arguments and number - of dimensions of arguments. + * linear-algebra/subspace.m: Check number of arguments, number + of dimensions of arguments and matching dimensions. 2008-03-19 Jaroslav Hajek <highegg@gmail.com>
--- a/scripts/linear-algebra/subspace.m Thu Mar 20 15:17:38 2008 +0100 +++ b/scripts/linear-algebra/subspace.m Thu Mar 20 12:06:07 2008 -0400 @@ -38,6 +38,8 @@ print_usage (); elseif (ndims (a) != 2 || ndims (b) != 2) error ("subspace: expecting A and B to be 2-dimensional arrays"); + elseif (rows (a) != rows (b)) + error ("subspace: column dimensions of a and b must match") endif a = orth (a);