0001 function [ mcol ] = getPhaseColor( varargin )
0002
0003
0004
0005 bin_num = 18;
0006 if nargin > 0
0007 bin_num = varargin{1};
0008 end
0009
0010
0011
0012
0013
0014 dStep_half = bin_num/2;
0015
0016
0017
0018
0019
0020 col_leftEnd = [255 0 0 ]./255;
0021 col_rightEnd = [0 0 225]./255;
0022
0023 col_step = ((col_rightEnd - col_leftEnd)'*flipud([1:-1/dStep_half:1/dStep_half]))';
0024 for i = 1:3
0025 mcol(:,i) = col_leftEnd(1,i).*ones(dStep_half,1) + col_step(:,i);
0026 end
0027
0028 mcol = [mcol; flipud(mcol)];
0029
0030
0031 mcol = hsv(18);
0032 mcol = [mcol(9:18,:); mcol(1:8,:)];
0033 end
0034