Question: 5 Debugging You are given a file debugPlot.m that is trying to produce a 3D surface plot with contours below the surface (using surfc) of
5 Debugging You are given a file debugPlot.m that is trying to produce a 3D surface plot with contours below the surface (using surfc) of f(x) sin(x) + cos(y)+sin(20y) + sin(x +y), however it has some errors. Debug the code so that the code runs without errors and produces a figure that matches fig.1. The function should take the number of points to use in both z and y as an input argument and return the figure z. There should be a point every 0.1T radians in r and y directions on your grid. Matlab function meshgrid might be helpful. Currently, the function is: function tz debugplotting ) dx 0.1pi; xlinspace (O,nx dx, nx) y linspace (o, nx.dx, nx); Wave 1 wave2 vave3 vave4 makevave ([1,0], sin); makevave (o, 1),cos); makevave ([200,20],sin); akevave (1,1].sin) z vave1 vave2+ wave3ave4; surfc (x ,y,z); title('Some Waves') xlabel (x) ylabel (y) zlabel('anplitude") function t vave - makevave( coefs,vavefun vave vavefun (coefs (1)x coefa (2) y): For this problem please submit the following files: . Files for this Problem debugWaves. IAB 5
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
