- #1

joshmccraney

Gold Member

- 1,957

- 102

i am trying to plot a contour (topographic) graph the following ##f(x,y) = \frac{1}{x^2+y^2} e^{x-(x^2+y^2)^{.5}}## where ##f(x,y) = k## where ##k = .001## and doubles in size for about 8 iterations. my attempt is here:

x=-3:0.25:3;

y=-3:0.25:3; z=.25:.25:1;

[X,Y]=meshgrid(x,y);

Z=1./(X.^2+Y.^2).*exp(X-(X.^2+Y.^2));

surfc(X,Y,Z); xlabel('x'); ylabel('y'); zlabel('z')

can someone please help me out?

thanks!