Question: MATLAB PRACTICE EXAM - PROBLEM 3 : The area of a closed polygon can be computed from the coordinates of the polygon's vertices. If the
MATLAB PRACTICE EXAM PROBLEM : The area of a closed polygon can be computed from the coordinates of the polygon's vertices. If the points are dots, then here's the formula:
Notice the formula is for times the area to get the area, calculate the number on the right and divide it by Also, the number you get will depend on whether you go clockwise or counterclockwise around the polygon. One direction will give the negative of the other, so to get the actual area, find the area as above and then take the absolute value.
Write a function in a MATLAB mfile to determine the area of a closed polygon using this method. The input parameters must be the vectors and with the coordinates of the polygon's vertices, and the output the area enclosed by these points. Notice that this method can be used to estimate irregular closed areas if the boundary coordinates are known.
Download the Excel file DataMATLAB darr and save it in your MATLAB current folder.
For each zone in the file, do the following:
a Create a scatter plot in MATLAB with the and coordinates to visualize the area.
b Call your function from the live script file to determine the area of the zone.
c Compare your result with the one given by the MATLAB function trapz.
SAVE YOUR LIV SCRIPT FILE
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
