


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.


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