cmap = [ ...
    1.0000    1.0000    1.0000
    %.7          1         1
    .5          1         1
    .2         .2         1
    %0.3333    1.0000    0.4333
      .2       0.97         .2
    1.0000    1.0000         0
    1.0000    0.5000         0
    0.8000         0         0
    .90          0           .5
    .95          0           .8
    1            0           1];
%colorbar;

NR = length(cmap); %length of original cmap
NF=100; %number of rows in the fine colormap matrix

xr = 0:1/(NR-1):1; %vector of length NR spanning 0:1
xf= 0:1/(NF-1):1; %vector of length NF spanning 0:1;

%interpolate each column to the finer grid
cmapf = [ (interp1(xr,cmap(:,1), xf))' (interp1(xr,cmap(:,2), xf))'  (interp1(xr,cmap(:,3), xf))'];

cmapf(find(cmapf >=1)) =1;
cmapf(find(cmapf <= 0)) =0;
