Mercurial > hg > octave-lyh
changeset 5721:bd39bbda9bd9
[project @ 2006-03-28 14:30:03 by jwe]
author | jwe |
---|---|
date | Tue, 28 Mar 2006 14:30:03 +0000 |
parents | 067948dc39bf |
children | 8272a8f03b80 |
files | scripts/ChangeLog scripts/general/isscalar.m scripts/general/isvector.m scripts/plot/__errplot__.m |
diffstat | 4 files changed, 13 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/ChangeLog +++ b/scripts/ChangeLog @@ -1,3 +1,13 @@ +2006-03-28 John W. Eaton <jwe@octave.org> + + * general/isscalar.m: Only require that all dimensions are 1 for + compatiblity. + +2006-03-28 Bill Denney <bill@givebillmoney.com> + + * general/isvector.m: Allow non-numeric objects to be vectors for + compatibility. + 2006-03-28 Keith Goodman <kwgoodman@gmail.com> * plot/__errplot__.m: Doc string fix.
--- 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
--- 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
--- 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