Mercurial > hg > octave-avbm
changeset 7615:25eacc0c2706
Ensure k is an integer scalar in rotdim
author | David Bateman <dbateman@free.fr> |
---|---|
date | Thu, 20 Mar 2008 15:17:38 +0100 |
parents | 52f90c7adac6 |
children | fb4fa07bc364 |
files | scripts/ChangeLog scripts/general/rotdim.m |
diffstat | 2 files changed, 4 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/ChangeLog +++ b/scripts/ChangeLog @@ -1,5 +1,7 @@ 2008-03-20 David Bateman <dbateman@free.fr> + * general/rotdim.m: Ensure k is an integer scale. + * general/circshift.m: If matrix is empty fast return. 2008-03-20 Jaroslav Hajek <highegg@localhost.localdomain>
--- a/scripts/general/rotdim.m +++ b/scripts/general/rotdim.m @@ -58,8 +58,8 @@ endif if (nargin > 1 && ! isempty(k)) - if (imag (k) != 0 || fix (k) != k) - error ("rotdim: k must be an integer"); + if (!isscalar (k) || imag (k) != 0 || fix (k) != k) + error ("rotdim: k must be an scalar integer"); endif else k = 1;