Question
Example 2 In MATLAB PLEASE... Write a program that will calculate the area of a rectangle or the surface area and volume of a box.
Example 2 In MATLAB PLEASE...
Write a program that will calculate the area of a rectangle or the surface area and volume of a box.
a.The script should use a menu and switch-case statement to ask the user if they want do the rectangle or box calculations.
i.If the rectangle is chosen the user should be asked to enter a base and width
ii.If the box is chosen they should enter base, width, and length
b.A variable input/output function should be written to return either the area of the rectangle or the surface area and volume of the box
c.The output should be displayed with a nicely formatted fprintf
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