From: <car...@us...> - 2012-09-02 03:17:53
|
Revision: 10946 http://octave.svn.sourceforge.net/octave/?rev=10946&view=rev Author: carandraug Date: 2012-09-02 03:17:47 +0000 (Sun, 02 Sep 2012) Log Message: ----------- isimage: also check if input is real Modified Paths: -------------- trunk/octave-forge/main/image/inst/isind.m trunk/octave-forge/main/image/inst/private/isimage.m Modified: trunk/octave-forge/main/image/inst/isind.m =================================================================== --- trunk/octave-forge/main/image/inst/isind.m 2012-09-02 02:48:30 UTC (rev 10945) +++ trunk/octave-forge/main/image/inst/isind.m 2012-09-02 03:17:47 UTC (rev 10946) @@ -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); Modified: trunk/octave-forge/main/image/inst/private/isimage.m =================================================================== --- trunk/octave-forge/main/image/inst/private/isimage.m 2012-09-02 02:48:30 UTC (rev 10945) +++ trunk/octave-forge/main/image/inst/private/isimage.m 2012-09-02 03:17:47 UTC (rev 10946) @@ -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 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |