plotting functions over domain
50 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
lateef
am 23 Mär. 2023
Bearbeitet: the cyclist
am 23 Mär. 2023
how would i go about doing this im constanly getting erros with my current code
Plot the function f (x, y) = (x^2 + 3y^2)e^1−x^2-y^2
over the domain −1 ≤ x ≤ 1, −1 ≤ y ≤ 1.
0 Kommentare
Akzeptierte Antwort
Matt J
am 23 Mär. 2023
fsurf(@(x,y) (x.^2 + 3*y.^2).*exp(1 - x.^2 - y.^2), [-1,1],ShowContours='on');
0 Kommentare
Weitere Antworten (1)
the cyclist
am 23 Mär. 2023
f = @(x,y) (x.^2 + 3*y.^2).*exp(1 - x.^2 - y.^2); % I'm not certain about your notation here
x = -1 : 0.05 : 1;
y = -1 : 0.05 : 1;
[xx,yy] = meshgrid(x,y);
figure
surf(xx,yy,f(xx,yy))
2 Kommentare
the cyclist
am 23 Mär. 2023
Bearbeitet: the cyclist
am 23 Mär. 2023
Just realizing I did your homework for you
Siehe auch
Kategorien
Mehr zu 2-D and 3-D Plots finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!