Mercurial > hg > octave-image
changeset 575:cefe03364864
isind: use builtin function isindex
author | carandraug |
---|---|
date | Sun, 02 Sep 2012 02:48:30 +0000 |
parents | b64d36b203a2 |
children | 68c4ecc7adf3 |
files | inst/isind.m |
diffstat | 1 files changed, 1 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/inst/isind.m +++ b/inst/isind.m @@ -42,7 +42,7 @@ elseif (ndims (img) == 2 && isreal (img)) switch (class (img)) case "double" - bool = ispart (@is_ind_double, img); + bool = isindex (img); case {"uint8", "uint16"} bool = true; endswitch @@ -50,10 +50,6 @@ endfunction -function bool = is_ind_double (img) - bool = all (img(:) == fix (img(:))) && all (img(:) >= 1); -endfunction - %!fail(isind([])) ## should fail for empty matrix %!assert(isind(1:10)) %!assert(!isind(0:10))