ngth(cmap);
0047 cind=round(1+(att-cmin)/(cmax-cmin)*(lcm-1));
0048 cind(cind&lt;1)=1;
0049 cind(cind&gt;lcm)=lcm;
0050 s1=size(att,1);
0051 <span class="keyword">for</span> k=1:3,
0052    cols(:,:,k)=cmap(cind(:),k).*alfa(:)+1-alfa(:);
0053 <span class="keyword">end</span>
0054 <span class="keyword">return</span>
0055 <span class="keyword">for</span> i=1:size(att,1),
0056     <span class="keyword">for</span> j=1:size(att,2),
0057         cols(i,j,:)=cmap(cind(i,j),:)*alfa(i,j)+1-alfa(i,j);
0058     <span c