Solved: For the following two-variable function: z = 2x sin(x) + xy cos(2y) i. Plot a 3D mesh for z, for the range: -2 lessthanorequalto x lessthanorequalto

CPEG 201 L Lab #3 AUK (Summer 2017) 3. For this problem, dont write an m-file; just show the sequence of the executed command at the MATLAB prompt and the generated results. For the following two-variable function: 2x sin(x) + xy cos(2y) z i. Plot a 3D mesh for z, for the range: -23x32 and-3 sy s 3 in steps of 0.1, and add labels for all axes. (16 marks) ii. Find the minimum and maximum values of z. (4 marks) iii. Use contour plots to find two different values for (x ,y), when z = +1. (10 marks) iv. Plot a 2x2 mesh graph array showing the cross sections x-y, a-z, y-z, in graphs (1), (2), and (3), respectively, while the 3D x-y-z in graph (4). Add labels and titles. (10 marks) Use MATLAB help to display the contour lines for z-0, 1 and 4 only, while showing the values of the contour levels for x20,y20. (10 marks) v. Display it using matlab

For the following two-variable function: z = 2x sin(x) + xy cos(2y) i. Plot a 3D mesh for z, for the range: -2 lessthanorequalto x lessthanorequalto 2 and -3 lessthanorequalto y lessthanorequalto 3 in steps of 0.1, and add labels for all axes. ii. Find the minimum and maximum values of z. iii. Use contour plots to find two different values for (x, y), when z- = +1. iv. Plot a 2 times 2 mesh graph array showing the cross sections x-y, x-z, y-z, in graphs (1), (2), and (3), respectively, while the 3D x-y-z in graph (4). Add labels and titles. v. Use MATLAB help to display the contour lines for z = 0, 1 and 4 only, while showing the values of the contour levels for x greaterthanorequalto 0, y greaterthanorequalto 0.

Expert Answer

 

Solved: For the following two-variable function: z = 2x sin(x) + xy cos(2y) i. Plot a 3D mesh for z, for the range: -2 lessthanorequalto x lessthanorequalto 1Solved: For the following two-variable function: z = 2x sin(x) + xy cos(2y) i. Plot a 3D mesh for z, for the range: -2 lessthanorequalto x lessthanorequalto 2

Don't use plagiarized sources. Get Your Custom Essay on
Solved: For the following two-variable function: z = 2x sin(x) + xy cos(2y) i. Plot a 3D mesh for z, for the range: -2 lessthanorequalto x lessthanorequalto
GET AN ESSAY WRITTEN FOR YOU FROM AS LOW AS $13/PAGE
Order Essay

Executable code

%Declare and initialize intervals
xInterval = -2:1:2;
yInterval = -3:1:3;

%Mesh grid
[xValue,yValue] = meshgrid(xInterval,yInterval);

%Given function
zValue = (2.*xValue.*sin(xValue)) + (xValue.*yValue.*cos(2.*yValue));

%3D Mesh
mesh(xValue,yValue,zValue)

%Label the axis
xlabel(‘x axis’)

%Label the axis
ylabel(‘y axis’)

%Label the axis
zlabel(‘z axis’)

%Find minimum value
minvalueofZ = min(min(zValue))

%Find maximum value
maxvalueofZ = max(max(zValue))

%Hold on
hold on

%Coutour
contour(xValue,yValue,zValue)

%Hold on
hold on

Still stressed from student homework?
Get quality assistance from academic writers!