Mercurial > hg > octave-lyh
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 +++ b/scripts/ChangeLog @@ -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 +++ b/scripts/linear-algebra/subspace.m @@ -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);