Question: Can someone please complete the following problem in MATLAB? A user written function is required that will plot a shape given a list of the

Can someone please complete the following problem in MATLAB?

Can someone please complete the following problem in MATLAB? A user written

A user written function is required that will plot a shape given a list of the coordinates for the vertices and a LineSpec for the type of line to be drawn. filename: plot_shape.m The function call must be: done = plot_shape(vertices, LineSpec) The function is required to: - set done =0 to indicate that function has not completed execution - identify the number of vertices in the list ( use MATLAB's size function to get the number of rows and columns ) - add a copy of the first vertex to the end of the list to "close the shape" (extend the vertex matrix by adding a copy of the first column after the last column) - plot the list of vertices with the LineSpec specified - where LineSpec adheres to the MATLAB LineSpec standard - set done =1 to indicate that function executed properly Test plot_shape() in the command window environment to verify it is working properly

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!