1 function [col,varargout]=getcolors(colorscheme,varargin);
\r
2 % Returns a color or a sequence of colors.
\r
3 % The sequence can be accessed through a variable amount of output arguments
\r
4 % (each one containing a character representing a color), or through a string.
\r
6 % Syntax: (* = optional)
\r
8 % [color, color2, color3, ...] = getcolors(colorscheme);
\r
9 % colorseq = getcolors(colorscheme, n);
\r
14 % An integer that is used for calculating the color sequence. Different values
\r
15 % give different sequences.
\r
17 % Amount of colors in the resulting sequence of colors (the 'colorseq' output argument)
\r
21 % 1. color, color2, color3, ...
\r
22 % A character representing a color. Matlab standards are used, so for instance
\r
23 % 'b' means blue and 'g' means green (see the documentation of the plot command
\r
24 % for a list of colors).
\r
26 % A string containing a sequence of colors (characters).
\r
28 % Toolbox for nonlinear filtering.
\r
29 % Copyright (C) 2005 Jakob Rosén <jakob.rosen@gmail.com>
\r
31 % This program is free software; you can redistribute it and/or
\r
32 % modify it under the terms of the GNU General Public License
\r
33 % as published by the Free Software Foundation; either version 2
\r
34 % of the License, or (at your option) any later version.
\r
36 % This program is distributed in the hope that it will be useful,
\r
37 % but WITHOUT ANY WARRANTY; without even the implied warranty of
\r
38 % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
\r
39 % GNU General Public License for more details.
\r
41 % You should have received a copy of the GNU General Public License
\r
42 % along with this program; if not, write to the Free Software
\r
43 % Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
\r
53 col(i)=colors(rem(j,n)+1);
\r
57 col=colors(rem(j,n)+1);
\r
61 varargout{i}=colors(rem(j,n)+1);
\r