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

c = bone(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.