%% Change Colormap of Displayed Image
% Read a sample indexed image, corn.tif, into the workspace, and then display it.

[X,map] = imread('corn.tif');
imshow(X,map)

%
% Change the colormap for the image using the colormap function. Use the original colormap without the red component.

newmap = map;
newmap(:,1) = 0;
colormap(newmap)

% Copyright 2012 The MathWorks, Inc.