Home / Expert Answers / Computer Science / matlab-code-write-a-script-that-calculates-the-area-and-wetted-perimeter-of-a-trapezoid-definition-pa874

(Solved): matlab code Write a script that calculates the area and wetted perimeter of a trapezoid. Definition ...



matlab code

Write a script that calculates the area and wetted perimeter of a trapezoid. Definition of the area and wetted perimeter are
Write a script that calculates the area and wetted perimeter of a trapezoid. Definition of the area and wetted perimeter are shown in the following figure: The program gets three user inputs (bottom width B, side slope \( z \), and depth \( y \) ) and generates one output stating the Area (A) and Wetted perimeter (P) of a trapezoid. Use a function to calculate area and wetted perimeter and call the function from the main script file. Upload the main script and function script in .m file format. PDF or Live script will not be accepted for grading.


We have an Answer from Expert

View Expert Answer

Expert Answer


#defining the function that calculates the area and wetted perimeter of a trapezoid def calculate_perimeter(b,z,y): area = (b*y + (z*y**2)/2) #Calcula
We have an Answer from Expert

Buy This Answer $5

Place Order

We Provide Services Across The Globe