I need help with this matlab question Please input the answe

I need help with this matlab question. Please input the answer in matlab code:

For the function f(x, y) = sin(3x + y) 2 cos(x y). Generate 15 labeled contour curves for f(x, y) over the region R = [0, 2] × [0, 2]. Also, graph the surface for f(x, y) over the region R. You should have to graphs; one with the labeled contour levels and the other having the surface and the non-labeled contours.

Solution

Here we use the following matlab coding for the 15 contour graphs :

%

x=linespace(0,2,50);

y=linespace(0,2,50)

f=@(x,y)(sin(3*x+y)-2*cos(x-y));

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

Z=f(x,y);

contour(x,y,z,15);

end

I need help with this matlab question. Please input the answer in matlab code: For the function f(x, y) = sin(3x + y) 2 cos(x y). Generate 15 labeled contour cu

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site