MATLAB: How to change a certain value color in pcolor

pcolor

Dear all, I got an random matrix 1000-by-1000,varying from 1 to 10. I am using pcolor as below:
A=randi(10,1000)
figure
pcolor(A)
shading flat
h = colorbar;
ylabel(h, 'IM( \kappa )')
colormap jet
I want to change to color of the element of 5 to pink. How should I do? Thanks

Best Answer

cmap = colormap;
N = 10;
x = linspace(1, size(cmap, 1), N);
cmap = cmap(x, :);
pink = [255 204 221]/255;
cmap(5,:) = pink;
colormap(cmap)
pcolor(A)
To change back to the default colormap:
colormap('default')