# HG changeset patch # User jwe # Date 1182968419 0 # Node ID 721953d49b192b09ef7147c0d0e7ade2c67d86c0 # Parent 813172f035de3c3eec2d7af5222927d75f8d64a9 [project @ 2007-06-27 18:20:19 by jwe] diff -r 813172f035de -r 721953d49b19 scripts/ChangeLog --- a/scripts/ChangeLog Wed Jun 27 15:08:06 2007 +0000 +++ b/scripts/ChangeLog Wed Jun 27 18:20:19 2007 +0000 @@ -1,3 +1,8 @@ +2007-06-27 Michael Goffioul + + * image/colormap.m: Only return colormap if nargout > 0. + Mark as command. + 2007-06-25 John W. Eaton * plot/drawnow.m, plot/__go_draw_axes__.m: Use strcmpi instead of diff -r 813172f035de -r 721953d49b19 scripts/image/colormap.m --- a/scripts/image/colormap.m Wed Jun 27 15:08:06 2007 +0000 +++ b/scripts/image/colormap.m Wed Jun 27 18:20:19 2007 +0000 @@ -37,6 +37,8 @@ ## Created: July 1994 ## Adapted-By: jwe +## PKG_ADD: mark_as_command colormap + function cmap = colormap (map) if (nargin > 1) @@ -67,6 +69,8 @@ endif ## Return current color map. - cmap = get (gcf (), "colormap"); + if (nargout > 0) + cmap = get (gcf (), "colormap"); + endif endfunction