this is code correct
Ältere Kommentare anzeigen
Hello I wanted to know if my code is correct for this type of equation
z = f(x, y) for −2 ≤ x ≤ 2 and −2𝜋 ≤ y ≤ 2𝜋
where
f(x, y) = e−0.2x sin(2y)
THIS IS THE CODE I wrote
%Plot a function
f=@(x,y) (exp(-0.2.*x)).* sin(2.*y);
fimplicit(f,[-2 2 -2*pi 2*pi])
Antworten (3)
Star Strider
am 19 Mär. 2021
0 Stimmen
It appears to be correct, and the code runs without error.
2 Kommentare
Aminata camara
am 19 Mär. 2021
Star Strider
am 19 Mär. 2021
My pleasure.
Chnage it to:
fsurf(f,[-2 2 -2*pi 2*pi])
.
Walter Roberson
am 19 Mär. 2021
0 Stimmen
The assignment to f appears to be correct, and the plotting bounds appear to be correct. However, nothing in the problem statement says that you are solving for f(x,y) = 0, so you should not be using fimplicit(). You should use fsurf() instead.
Maria Quennie
am 17 Okt. 2023
0 Stimmen
plot function 0 ≤ 𝑥 ≤ 2𝜋 using sin2(x)
1 Kommentar
Walter Roberson
am 17 Okt. 2023
I do not understand how this solves the original question? Please expand on how making this plot would help the original poster?
Kategorien
Mehr zu Surface and Mesh Plots finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!