Home > bioelectromagnetism > bluehot.m

bluehot

PURPOSE ^

BLUEHOT make blue hot to red hot dual intensity colorscale

SYNOPSIS ^

function cmap = bluehot(N);

DESCRIPTION ^

 BLUEHOT make blue hot to red hot dual intensity colorscale
 function cmap = bluehot(N);
 returns N=64, if N not given.  
 Negative values are blue, positive values are red, with intuitive
  convention that positive values are "warmer" than negative.  I would have
  preferred that positive values were coming at you "faster," and therefore
  had a "blue" shift.  But that's another kind of physics, I guess.

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function cmap = bluehot(N);
0002 % BLUEHOT make blue hot to red hot dual intensity colorscale
0003 % function cmap = bluehot(N);
0004 % returns N=64, if N not given.
0005 % Negative values are blue, positive values are red, with intuitive
0006 %  convention that positive values are "warmer" than negative.  I would have
0007 %  preferred that positive values were coming at you "faster," and therefore
0008 %  had a "blue" shift.  But that's another kind of physics, I guess.
0009 
0010 % Copyright (c) 1995, The Regents of the University of California.
0011 % This software was produced under a U.S. Government contract
0012 % (W-7405-ENG-36) by Los Alamos National Laboratory, which is operated
0013 % by the University of California for the U.S. Department of Energy,
0014 % and was funded in part by NIH grant R01-MH53213 through the University
0015 % of Southern California,
0016 % and was funded in part by NIH grant R01-EY08610 to Los Alamos
0017 % National Laboratory.
0018 % The U.S. Government is licensed to use, reproduce, and distribute this
0019 % software.  Permission is granted to the public to copy and use this
0020 % software without charge, provided that this Notice and any statement
0021 % of authorship are reproduced on all copies.  Neither the Government
0022 % nor the University makes any warranty, express or implied, or assumes
0023 % any liability or responsibility for the use of this software.
0024 %
0025 % Author: John C. Mosher, Ph.D.
0026 % Los Alamos National Laboratory
0027 % Group ESA-MT, MS J580
0028 % Los Alamos, NM 87545
0029 % email: mosher@LANL.Gov
0030 
0031 % April 4, 1995 author
0032 % April 5, 1995 JCM flipped it for Lewine/Hamalainen convention
0033 % June 8,  1995 JCM, added default N and changed to return size N, not 2N
0034 if(exist('N')~=1),
0035   N = 64;            % default size
0036 end
0037 
0038 cmap1 = hot( ceil(N/2));        % in case its odd
0039 cmap2 = hot(floor(N/2));
0040 
0041 cmap = [flipud(cmap1(:,[3 2 1])); cmap2];
0042 % cmap = flipud([flipud(cmap);cmap(:,[3 2 1])]); % near is "hot", neg is "cold"
0043 
0044 return

Generated on Mon 15-Aug-2005 15:36:19 by m2html © 2003