function newmap=mapcontrast(map, c) %MAPCONTRAST Contrast the colormap % % Copyright (c) 1995 by Claudio Rivetti and Mark Young % claudio@alice.uoregon.edu, mark@alice.uoregon.edu % global MapSize if nargin>2 error('Too many input arguments.'); end if nargin<1 c=0; end if c<0 | c>10 error('Input argument must be between 0 and 10'); end ab=round(MapSize*(1-c*0.09)); bc=MapSize-ab; x=1:(MapSize/ab):MapSize; abmap=map(x,:); last=abmap(length(abmap),:); bcmap=[zeros(bc,1)+last(1) zeros(bc,1)+last(2) zeros(bc,1)+last(3)]; newmap=[abmap;bcmap]; return