%% Downsample the Pink Colormap
% Get a downsampled version of the pink colormap containing only twenty colors. Then display the contours of a paraboloid by applying the colormap and interpolated shading.

c = pink(20);
[X,Y] = meshgrid(-10:1:10);
Z = X.^2 + Y.^2;
surf(X,Y,Z);
colormap(c);
shading interp;

% Copyright 2012 The MathWorks, Inc.