%Interpolation and surface plots
n=5;
Z0=rand(n);
[X0, Y0]=meshgrid(1:n, 1:n);
[X1, Y1]=meshgrid(1:.1:n, 1:.1:n);
Z1=interp2(X0, Y0, Z0, X1, Y1, 'cubic');
figure;
surf(X1, Y1, Z1);
colormap hsv;
shading interp;
hold on;
contour(X1, Y1, Z1, 15);
colorbar;
caxis([0,1]);


