Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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?
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started