Mercurial > hg > octave-nkf
diff scripts/image/white.m @ 11420:466ba499eff5
Update docstrings for colormap files.
author | Rik <octave@nomad.inbox5.com> |
---|---|
date | Tue, 28 Dec 2010 13:08:23 -0800 |
parents | 2b0cc0b6db61 |
children | fd0a3ac60b0e |
line wrap: on
line diff
--- a/scripts/image/white.m +++ b/scripts/image/white.m @@ -17,7 +17,8 @@ ## <http://www.gnu.org/licenses/>. ## -*- texinfo -*- -## @deftypefn {Function File} {} white (@var{n}) +## @deftypefn {Function File} {@var{map} =} white () +## @deftypefnx {Function File} {@var{map} =} white (@var{n}) ## Create color colormap. This colormap is completely white. ## The argument @var{n} should be a scalar. If it ## is omitted, the length of the current colormap or 64 is assumed. @@ -26,20 +27,20 @@ ## Author: Kai Habel <kai.habel@gmx.de> -function map = white (number) +function map = white (n) if (nargin == 0) - number = rows (colormap); + n = rows (colormap); elseif (nargin == 1) - if (! isscalar (number)) + if (! isscalar (n)) error ("white: argument must be a scalar"); endif else print_usage (); endif - if (number > 0) - map = ones (number, 3); + if (n > 0) + map = ones (n, 3); else map = []; endif @@ -50,5 +51,5 @@ %! ## Show the 'white' colormap as an image %! image (1:64, linspace (0, 1, 64), repmat (1:64, 64, 1)') %! axis ([1, 64, 0, 1], "ticy", "xy") -%! colormap white +%! colormap (white (64))