Home > chronux_1_50 > spikesort > maplecolor.m

maplecolor

PURPOSE ^

MAPLECOLOR Generates truecolor data in the default Maple color scheme.

SYNOPSIS ^

function C = maplecolor(X,Y,Z)

DESCRIPTION ^

MAPLECOLOR        Generates truecolor data in the default Maple color scheme.
   C = MAPLECOLOR(X,Y,Z) generates an M-by-N-by-3 matrix when each of X, Y,
   and Z are M-by-N.  The resulting truecolor matrix maps [X,Y,Z] to
   [R,G,B], scaled to soften the colors.

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function C = maplecolor(X,Y,Z)
0002 %MAPLECOLOR        Generates truecolor data in the default Maple color scheme.
0003 %   C = MAPLECOLOR(X,Y,Z) generates an M-by-N-by-3 matrix when each of X, Y,
0004 %   and Z are M-by-N.  The resulting truecolor matrix maps [X,Y,Z] to
0005 %   [R,G,B], scaled to soften the colors.
0006 
0007 C = cat(3, X, Y, Z);
0008 
0009 for slice = 1:3
0010     intense = C(:,:,slice);
0011   
0012     % Rescale each slice to [0.3, 0.9]
0013     intense = intense - min(intense(:));
0014     intense = intense ./ max(intense(:)) .* 0.6;
0015     intense = intense + 0.3;
0016 
0017     C(:,:,slice) = intense;
0018 end

Generated on Mon 09-Oct-2006 00:54:52 by m2html © 2003