this is code correct
์กฐํ ์: 1 (์ต๊ทผ 30์ผ)
์ด์ ๋๊ธ ํ์
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])
๋๊ธ ์: 0
๋ต๋ณ (3๊ฐ)
Star Strider
2021๋
3์ 19์ผ
It appears to be correct, and the code runs without error.
๋๊ธ ์: 2
Star Strider
2021๋
3์ 19์ผ
My pleasure.
Chnage it to:
fsurf(f,[-2 2 -2*pi 2*pi])
.
Walter Roberson
2021๋
3์ 19์ผ
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.
๋๊ธ ์: 2
Maria Quennie
2023๋
10์ 17์ผ
plot function 0 โค ๐ฅ โค 2๐ using sin2(x)
๋๊ธ ์: 1
Walter Roberson
2023๋
10์ 17์ผ
I do not understand how this solves the original question? Please expand on how making this plot would help the original poster?
์ฐธ๊ณ ํญ๋ชฉ
์นดํ ๊ณ ๋ฆฌ
Help Center ๋ฐ File Exchange์์ Surface and Mesh Plots์ ๋ํด ์์ธํ ์์๋ณด๊ธฐ
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!