%x=-2:.1:2; y=x; x=-4:.1:4; y=x; n=size(x,2); a=[]; axis('xy') for j=1:n; for k=1:n; a(j,k)=F(x(j),y(k)); end end mesh(x,y,a) figure contour(a)