Question: MatLab Engineering language , Challenge problem 2 Create x and y vectors from -5 to +5 with spacing of 0.2. Use the meshgrid function to

MatLab Engineering language , Challenge problem 2

Create x and y vectors from -5 to +5 with spacing of 0.2. Use the meshgrid function to map x and y onto two new two-dimensional matrices called X and Y. Use your new matrices to calculate vector Z, with values given by

Z=sin ( X2 + Y2 )

Your task is to create an array of plots, forming a 2x2 rectangular grid. One plot should come from each of the following tasks:

Use the mesh plotting function to create a three-dimensional plot of Z.

Use the surf plotting function to create a three-dimensional plot of Z. Compare (in comments) the results you obtain with a single input Z with those obtained with inputs for all three dimensions (X, Y, Z).

Create a new surface plot, this time with interpolated shading. Pick a nice color map (help graph3d contains a list of different color maps).

Generate a contour plot of Z. Use handle graphics and the clabel function to label the contour lines.

Grading Criteria. To achieve Meets Expectations for this Challenge Problem, the file should:

Define x and y as specified, calculate X and Y correctly, and calculate Z values correctly.

Create four different subplots of the function, including mesh, surf, and contour.

To achieve Exceeds Expectations for this Challenge Problem, the file should do at least three of the following four tasks:

Create four different plots as specified, including mesh, surf, shading interp, and contour, in a 2x2 subplot grid in a single figure window.

Comment on the difference between using 1 input or all three (as instructed in part B).

Label the contour lines as specified.

Include axis labels and titles for all graphs.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!