diff scripts/image/ocean.m @ 6791:be31a048c449

[project @ 2007-07-24 19:04:51 by dbateman]
author dbateman
date Tue, 24 Jul 2007 19:04:51 +0000
parents c81a0f3f5a82
children 93c65f2a5668
line wrap: on
line diff
--- a/scripts/image/ocean.m	Tue Jul 24 19:02:27 2007 +0000
+++ b/scripts/image/ocean.m	Tue Jul 24 19:04:51 2007 +0000
@@ -20,7 +20,7 @@
 ## -*- texinfo -*-
 ## @deftypefn {Function File} {} ocean (@var{n})
 ## Create color colormap.  The argument @var{n} should be a scalar.  If it
-## is omitted, 64 is assumed.
+## is omitted, the length of the current colormap or 64 is assumed.
 ## @end deftypefn
 
 ## Author: Tony Richardson <arichard@stark.cc.oh.us>
@@ -30,7 +30,7 @@
 function map = ocean (number)
 
   if (nargin == 0)
-    number = 64;
+    number = rows (colormap);
   elseif (nargin == 1)
     if (! isscalar (number))
       error ("ocean: argument must be a scalar");