How to plot "f(x,y) = e^-(x^2+y^2)" function in matlab?

64 views (last 30 days)
Undefined function or variable 'y'.
Error in Untitled (line 5)
y = exp(x.^2+y.^2);
my computer gives these errors and I do not know how to fix them.

Accepted Answer

Star Strider
Star Strider on 9 Apr 2020
Edited: Torsten on 9 Apr 2020
Try this:
figure
fsurf(@(x,y)exp(-(x.^2+y.^2)), [-2 2 -2 2])
  8 Comments
Torsten
Torsten on 13 Aug 2022 at 12:42
Can you also suggest for me what range would i change if i want to draw the function f(x,y)=(x^(2)+y^(2)) ℯ^(y^(2)-x^(2))
The proof of the pudding is in the eating.

Sign in to comment.

More Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by