# HG changeset patch # User jwe # Date 1143556203 0 # Node ID bd39bbda9bd9369755d8dcfdc3c01c69345a02d0 # Parent 067948dc39bf84eaf6b243ab05e55a48365b90cc [project @ 2006-03-28 14:30:03 by jwe] diff --git a/scripts/ChangeLog b/scripts/ChangeLog --- a/scripts/ChangeLog +++ b/scripts/ChangeLog @@ -1,3 +1,13 @@ +2006-03-28 John W. Eaton + + * general/isscalar.m: Only require that all dimensions are 1 for + compatiblity. + +2006-03-28 Bill Denney + + * general/isvector.m: Allow non-numeric objects to be vectors for + compatibility. + 2006-03-28 Keith Goodman * plot/__errplot__.m: Doc string fix. diff --git a/scripts/general/isscalar.m b/scripts/general/isscalar.m --- a/scripts/general/isscalar.m +++ b/scripts/general/isscalar.m @@ -27,13 +27,8 @@ function retval = isscalar (x) - retval = 0; - if (nargin == 1) - if (ismatrix (x)) - [nr, nc] = size (x); - retval = (nr == 1 && nc == 1); - endif + retval = prod (size (x)) == 1; else usage ("isscalar (x)"); endif diff --git a/scripts/general/isvector.m b/scripts/general/isvector.m --- a/scripts/general/isvector.m +++ b/scripts/general/isvector.m @@ -31,7 +31,7 @@ if (nargin == 1) sz = size (x); - retval = (isnumeric (x) && ndims (x) == 2 && (sz(1) == 1 || sz(2) == 1)); + retval = (ndims (x) == 2 && (sz(1) == 1 || sz(2) == 1)); else usage ("isvector (x)"); endif diff --git a/scripts/plot/__errplot__.m b/scripts/plot/__errplot__.m --- a/scripts/plot/__errplot__.m +++ b/scripts/plot/__errplot__.m @@ -26,7 +26,7 @@ ## @end example ## ## @seealso{semilogx, semilogy, loglog, polar, mesh, contour, __pltopt__, -## bar, stairs, errorbar, replot, xlabel, ylabel, and title} +## bar, stairs, errorbar, replot, xlabel, ylabel, title} ## @end deftypefn ## Created: 18.7.2000