% Harmonic functions on the unit disk

r=[0:0.05:1];
theta=[0:2*pi/100:2*pi];

X=r'*cos(theta);
Y=r'*sin(theta);

R=r'*ones(size(theta));
TH=ones(size(r'))*theta;

% Here is the degree n
n=4;

g=R.^n.*cos(n.*TH);
surf(X,Y,g);
colormap(copper);

