Mercurial > hg > octave-terminal
changeset 5407:2911127d0fe7
[project @ 2005-07-08 15:37:30 by jwe]
author | jwe |
---|---|
date | Fri, 08 Jul 2005 15:37:30 +0000 |
parents | c49aec8a9080 |
children | 9461ff9278fb |
files | scripts/ChangeLog scripts/strings/dec2base.m |
diffstat | 2 files changed, 8 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/ChangeLog +++ b/scripts/ChangeLog @@ -1,3 +1,7 @@ +2005-07-08 cctsim <cctsim@yahoo.co.uk> + + * strings/dec2base.m: Allow matrix arguments. + 2005-07-08 John W. Eaton <jwe@octave.org> * plot/__errplot__.m: Use __plot_globals__.
--- a/scripts/strings/dec2base.m +++ b/scripts/strings/dec2base.m @@ -55,9 +55,9 @@ endif if (prod (size (n)) != length (n)) - error ("dec2base: cannot convert matrices."); + n = n(:); elseif (any (n < 0 | n != fix (n))) - error ("dec2base: can only convert non-negative integers.") + error ("dec2base: can only convert non-negative integers") endif symbols = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"; @@ -65,10 +65,10 @@ symbols = base; base = length (symbols); if any (diff (sort (toascii (symbols))) == 0) - error ("dec2base: symbols representing digits must be unique."); + error ("dec2base: symbols representing digits must be unique"); endif elseif (! isscalar (base)) - error ("dec2base: cannot convert from several bases at once."); + error ("dec2base: cannot convert from several bases at once"); elseif (base < 2 || base > length (symbols)) error ("dec2base: base must be between 2 and 36 or a string of symbols"); endif