Mercurial > forge
changeset 10760:8e2efdc5e602 octave-forge
isimage: also check if input is real
author | carandraug |
---|---|
date | Sun, 02 Sep 2012 03:17:47 +0000 |
parents | be45aee16b0f |
children | 1298f8809806 |
files | main/image/inst/isind.m main/image/inst/private/isimage.m |
diffstat | 2 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/main/image/inst/isind.m Sun Sep 02 02:48:30 2012 +0000 +++ b/main/image/inst/isind.m Sun Sep 02 03:17:47 2012 +0000 @@ -39,7 +39,7 @@ bool = false; if (!isimage (img)) bool = false; - elseif (ndims (img) == 2 && isreal (img)) + elseif (ndims (img) == 2) switch (class (img)) case "double" bool = isindex (img);
--- a/main/image/inst/private/isimage.m Sun Sep 02 02:48:30 2012 +0000 +++ b/main/image/inst/private/isimage.m Sun Sep 02 03:17:47 2012 +0000 @@ -18,7 +18,7 @@ function bool = isimage (img) bool = true; - if (!ismatrix (img) || issparse (img) || isempty (img)) + if (!ismatrix (img) || issparse (img) || isempty (img) || !isreal (img)) bool = false; endif endfunction