

N=128;
a=-1;b=1;
c=-1;d=1;
x=linspace(a,b,N);
y=linspace(c,d,N);

for i=1:N;
for j=1:N;

z(i,j)=3*x(i)^2*y(j)/(x(i)^4+y(j)^2);
end;
end;
surf(x,y,z)
box on;
xlabel('x'); ylabel('y');zlabel('z');
title('$\displaystyle z=\frac{3x^2y}{x^4+y^2}$','Interpreter','latex');
 
figure;
contour(x,y,z,20)
axis([a b c d]);
axis square;
title('Level curves: $\displaystyle z=\frac{3x^2y}{x^4+y^2}$','Interpreter','latex');
