Question: Write a MATLAB script file for determining the area of rectangles ( A r ) , triangles ( A t ) and circles ( A

Write a MATLAB script file for determining the area of rectangles (Ar), triangles (At) and circles (Ac)
Ar=bh
At=12bh
Ac=r2
(a) The code should start by using a menu command to ask the user whether the shapes is a rectangle, triangle or a circle. Depending on the chosen shape, it will use a conditional selection of if -then or switch-case and a function input to get the dimensions b,h and r from the user.
(b) Through the same conditional selection, the computed area is displayed on screen using fprint f with three decimal places.
 Write a MATLAB script file for determining the area of rectangles

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!