Question
Dr. Su has decided this engineering career thing is not working out and decides to quit his job and become a middle man for unscrupulous
Dr. Su has decided this engineering career thing is not working out and decides to quit his job and become a middle man for unscrupulous traders selling antiquities. As part of his new career, he must deal with lengths in ancient units from Mediterranean empires as he must ship the antiquities in plain wooden shipping crates to avoid alerting local and international authorities. To help him out, write a MATLAB function that will get the empire and the dimensions of the minimum cuboid volume (length, width, and height) in cubits that would encompass the antiquity, convert the dimensions to inches, and determine how many crates and which standard commercial wooden shipping crates the antiquity could be shipped in (using the index numbers). The conversion factor from cubits to inches is not standard and depends on which culture/empire the antiquity is from: Egyptian Royal Cubit: one cubit is 20.83 inches Sumerian/Babylonian Cubit (kus): one cubit is 20.42 inches Persian Cubit: one cubit is 20.42 inches Greek Cubit (pechys): one cubit is 18.20 inches Roman Cubit: one cubit is 17.47 inches Others: one cubit is 21.0 inches The wooden shipping crate dimensions are stored in the MATLAB workspace file named lab5Data.mat. The crate dimensions (length, width, height) in inches are stored in the N by 3 array crateDim. The empire and dimensions should be read in using the MATLAB input function in your main program. The MATLAB input function will display a prompt and read in a value. The empire designation should be an integer corresponding to the empire so that a switch statement can be used to set the appropriate cubit conversion factor for the empire in your function. Examples of the use of the input function are shown: empireChoice = input('Choose an Empire: Egyptian (1) Sumerian (2) Persian (3) Greek (4) Roman (5) Other (6)'); width = input('Enter width in cubits: ');
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