Monday, 25 February 2013

Matlab code for famous Mexican hat

code


% program to plot Maxican hat

[x,y] = meshgrid(-8:0.5:8);
r = sqrt(x.^2+y.^2)+eps;
z = sin(r)./r;
surfc(z), shading flat
axis off

1 comment: