MATLAB: How to overlay contour plots with a different color map for each overlay

colormapsMATLABmatlab 2015boverlaying contours

I have been able to overlay contours using Matlab 2012b (see the example below) using freezecolors to allow each overlay to have a constant color that is different than the other overlays. But in 2015b freezecolors no longer works. According to this, I shouldn't need freezecolors anymore: http://www.mathworks.com/matlabcentral/fileexchange/7943-freezecolors—unfreezecolors
So I found this, but can't get it to work for what I am trying to do:
Any help to get this to work in 2015b would be greatly appreciated!!!

Best Answer

Z = peaks(100) ;
% plot valaues 1
figure
hold on
colors = {'r' 'b' 'g' 'y' 'm' 'k' 'c' 'g' 'r' 'k'} ;
for i = 1:10
contour(Z,[i i],colors{i},'ShowText','on') ;
end