%% Contours Over Discontinuous Surface
% Insert NaN values wherever there are discontinuities on a surface. The contourf function does not draw contour lines in those regions.
% Define matrix Z as a sampling of the peaks function. Replace all values in column 26 with NaN values. Then plot the contours of the modified Z matrix.

Z = peaks;
Z(:,26) = NaN;
contourf(Z)

% Copyright 2018 The MathWorks, Inc.