Mercurial > hg > octave-max
changeset 1062:1b3a87031641
[project @ 1995-01-24 02:54:50 by jwe]
author | jwe |
---|---|
date | Tue, 24 Jan 1995 02:54:50 +0000 |
parents | a08b7d48e3bc |
children | 1a3121ebf088 |
files | scripts/image/colormap.m |
diffstat | 1 files changed, 4 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/image/colormap.m +++ b/scripts/image/colormap.m @@ -34,7 +34,9 @@ global CURRENT_COLOR_MAP - cmap_name = "CURRENT_COLOR_MAP"; + if (nargin > 1) + usage ("colormap (map)"); + endif if (nargin == 1) if (isstr (map)) @@ -47,11 +49,9 @@ # Set the new color map CURRENT_COLOR_MAP = map; endif - elseif (nargin == 0 && exist (cmap_name) == 0) + elseif (! exist ("CURRENT_COLOR_MAP")) # If global color map doesn't exist, create the default map. CURRENT_COLOR_MAP = gray; - else - usage ("colormap (map)"); endif # Return current color map.