Home > vbmeg > functions > tool_box > dynamics_movie > test_fig > basic_tool > make_color_map.m

make_color_map

PURPOSE ^

SYNOPSIS ^

function cmap = make_color_map(Narea)

DESCRIPTION ^

 Copyright (C) 2011, ATR All Rights Reserved.
 License : New BSD License(see VBMEG_LICENSE.txt)

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function    cmap = make_color_map(Narea)
0002 %
0003 % Copyright (C) 2011, ATR All Rights Reserved.
0004 % License : New BSD License(see VBMEG_LICENSE.txt)
0005 
0006 Nmap   = ceil(exp(log(Narea)/3));
0007 clevel = (1:Nmap)/Nmap;
0008 
0009 [c1, c2, c3] = ndgrid(clevel);
0010 
0011 cmap = [c1(:), c2(:), c3(:)];
0012 cmap = cmap(1:Narea,:);

Generated on Mon 22-May-2023 06:53:56 by m2html © 2005