Question: Problem 1 (30 points). Graphics A Random Surface (15 points). Write a script called randomSurface.m to do the following: fo make a random surface, make

 Problem 1 (30 points). Graphics A Random Surface (15 points). Write

Problem 1 (30 points). Graphics A Random Surface (15 points). Write a script called randomSurface.m to do the following: fo make a random surface, make zo a 5x5 matrix of random values on the range [0,1]. Use function rand. / Make an Xo and YO using meshgrid and the vector -2:2 (use the same vector for both inputs into meshgrid). Now, X0, Y0, and Zo define 25 points on a surface) You are going to interpolate intermediate values to make the surface seem smooth. Make Xi and Yi using meshgrid and the vector -2:0,1:2 (again use the same vector for both inputs into meshgrid). Make Z1 by interpolating X0, Y0, and Z0 at the positions in Xi and YI using the interpolation function interp2 (type help interp2) Plot a surface plot of Zi. Hold on to the axes and plot the 15-line contour on the same axes. Add a colorbar. Submit your solution in a file called Probla.m including your name and ID number in the comments. Y f(x,y) = cos(2)? - cos(y)? (15 points). Plot the surface plot of the function f(x,y) = cos(x)? - cos(y) using two different approaches: By using X1 and YI % By using xo and Y0 and doing interpolation similarly to part a. Use subplot to show both plots separately on the same figure for better comparison. Submit your solution in a file called Probib.m including your name and ID number in the comments

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!