You are on page 1of 1

>> [X,Y] = meshgrid(-2:0.

1:2);
>> Z = X.*exp(-((X-Y.^2).^2+Y.^2));
>> meshc(X,Y,Z),xlabel('x'), ylabel('y'), zlabel('z')

0.5

-0.5
2
1

2
1

-1
y

-1
-2

-2

You might also like