diff scripts/image/imshow.m @ 13738:7ee61e56eaed

Periodic merge of stable to default
author Jordi Gutiérrez Hermoso <jordigh@octave.org>
date Thu, 20 Oct 2011 14:12:05 -0500
parents 2da28f71de80
children 5f0bb45e615c
line wrap: on
line diff
--- a/scripts/image/imshow.m	Thu Oct 20 15:35:44 2011 +0100
+++ b/scripts/image/imshow.m	Thu Oct 20 14:12:05 2011 -0500
@@ -115,6 +115,12 @@
     endif
   endwhile
 
+  ## Check for complex images.
+  if (iscomplex (im))
+    warning ("imshow: only showing real part of complex image");
+    im = real (im);
+  endif
+
   ## Set default display range if display_range not set yet.
   if (isempty (display_range))
     display_range = [min(im(:)), max(im(:))];
@@ -130,12 +136,6 @@
     endswitch
   endif
 
-  ## Check for complex images.
-  if (iscomplex (im))
-    warning ("imshow: only showing real part of complex image");
-    im = real (im);
-  endif
-
   nans = isnan (im(:));
   if (any (nans))
     warning ("Octave:imshow-NaN",