Home > freetb4matlab > image > colorgradient.m

colorgradient

PURPOSE ^

% Define a colour map which smoothly traverses the given colors.

SYNOPSIS ^

function ret = colorgradient(C,w,n)

DESCRIPTION ^

% -*- texinfo -*-
% @deftypefn {Function File} @var{M} = colorgradient(@var{C}, @var{w}, @var{n})
% Define a colour map which smoothly traverses the given colors.
% @var{C} contains the colours, one row per r,g,b value.
% @var{w}(i) is the relative length of the transition from colour i to colour i+1
% in the entire gradient.  The default is ones(rows(C)-1,1).
% n is the length of the colour map.  The default is rows(colormap).
%
% E.g.,
% @example 
% colorgradient([0,0,1; 1,1,0; 1,0,0])  % blue -> yellow -> red
% x = linspace(0,1,200);
% imagesc(x(:,ones(30,1)))';
% @end example
% @end deftypefn

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:
Generated on Fri 22-May-2009 15:13:00 by m2html © 2003