[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: colormap not returning value
From: |
David Bateman |
Subject: |
Re: colormap not returning value |
Date: |
Tue, 06 Nov 2007 21:53:31 +0100 |
User-agent: |
Thunderbird 1.5.0.7 (X11/20060921) |
Daniel J Sebald wrote:
> Counter to colormap documentation, nothing is being returned when there
> are no arguments, e.g., colormap()
>
> The attached patch might be more in line with documentation.
>
> Dan
>
>
>
> ------------------------------------------------------------------------
>
> --- /usr/local/src/octave-cvs/octave/scripts/image/colormap.m 2007-11-06
> 09:26:00.000000000 -0600
> +++ colormap.m 2007-11-06 14:36:09.233214868 -0600
> @@ -70,7 +70,7 @@
> endif
>
> ## Return current color map.
> - if (nargout > 0)
> + if (nargout >= 0)
> cmap = get (gcf (), "colormap");
> endif
>
I believe this was deliberate as I don't think matlab returns the
colormap without a return argument, though that should be checked.. In
that case it is the doc string that should be changed instead.
D.