Question: Write a MATLAB script file for determining the area of rectangles (Ar), triangles (A) and circles (Ac) Ar=bhAt=21bhAc=r2 (a) The code should start by using

 Write a MATLAB script file for determining the area of rectangles

Write a MATLAB script file for determining the area of rectangles (Ar), triangles (A) and circles (Ac) Ar=bhAt=21bhAc=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 fprintf with three decimal places

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!