
Concept explainers
One of the 14 NAE Grand Challenges is Engineering Better Medicines. Part of this Grand Challenge is creating individual medication plans for each patient, rather than sweeping recommendations based upon research using only one subset of the population. For example, in the past most heart attack protocols were created for white mates. It has been discovered in recent years that women have different initial symptoms and respond better to a different treatment protocol than their male counterparts.
To bettor tailor the medicine to the individual, you wish to write a computer program to allow the user to enter several variables. The program will then produce a suggested solution. Write the MATLAB code to:
a. Ask the user to enter his or her name (text).
b. Ask the user to type his or her weight (a number) in pounds-force.
c. Ask the user to select his or her symptom from a menu, given the following choices.
■ Cold
■ Flu
■ Migraine
d. Based upon the answer selected to the menu, set the medicine name, volume [mL] and mass [g] of the medicine tablet
e. Write (a) the function call from the program and (b) a function that will accept the mass and volume of the desired medicine from the main program and return the specific gravity of the desired medicine tablet to the program. Remember: The density of water is 1000 kilograms per cubic meter,
f. Write (a) the function call from the program and (b) a function that will accept the weight of the person, specific gravity of the medicine, and tablet volume from the main program and return the number of tablets recommended for the person to the program. To determine the number of tablets needed, the following equation should be used and then rounded up to the next whole number of tablets. Any calculations or conversions necessary should appear in the function.
g. Write an output statement that appears as follows, where N is replaced by the name of the medicine and x.xxx is replaced by the calculated specific gravity formatted to show three decimal places: The specific gravity of N is X.XXX.
h. Write an output statement that appears as follows, where AAAA is the name of the user, n is the name of the medicine, yyy is the name of their symptom, and Z is the number of tablets recommended
AAAA, your recommended dosage of N to treat a YYY: Z tablets.
Note
Although you may use conditional statements to solve this problem, none are needed if you set up the medicine data table as a cell array.

Trending nowThis is a popular solution!

Chapter 18 Solutions
Thinking Like an Engineer: An Active Learning Approach (4th Edition)
- Which of the following sequences converge and which diverge? 1) a₁ = 2+(0.1)" 1-2n 2) a = 1+2n 1/n 3 16) a = n In n 17) an = n 1/n 1-5n4 3) an = n² +8n³ 18) an = √4" n n² -2n+1 n! 20) a = 4) an = 106 5) n-1 a₁ =1+(-1)" n+1 a-(+) (1-4) 6) = 7) a = 2n (-1)"+1 2n-1 21) an = n -A" 1/(Inn) 3n+1 22) a = 3n-1 1/n x" 23) a = , x>0 2n+1 3" x 6" 24) a = 2™" xn! 2n 8) a = n+1 πT 1 9) a„ = sin +- 2 n sin n 10) an = n 25) a = tanh(n) 26) a = 2n-1 27) a = tan(n) 1 -sin n n 11) a = 2" 28) an == " 1 + 2" In(n+1) 12) a = n (In n) 200 29) a = n 13) a = 8/n 14) a 1+ =(1+²)" 15) an 7 n = 10n 30) an-√√n²-n 1"1 31) adx nixarrow_forwardA steel alloy contains 95.7 wt% Fe, 4.0 wt% W, and 0.3 wt% C.arrow_forwardb. A horizontal cantilever of effective length 3a, carries two concentrated loads W at a distance a from the fixed end and W' at a distance a from the free end. Obtain a formula for the maximum deflection due to this loading using Mohr's method. If the cantilever is 250 mm by 150mm steel I beam, 3 m long having a second moment of area I as 8500 cm4, determine W and W'to give a maximum deflection of 6 mm when the maximum stress due to bending is 90 Mpa. Take Young's modulus of material E as 185 Gpa.arrow_forward
- Which of the following sequences converge and which diverge? 1/n 1) a₁ = 2+(0.1)" 3 16) a = n 1-2n 2) a = In n 1+2n 17) an = 1/n n 1-5n4 3) an = n² +8n³ 18) an = √4" n n! n² -2n+1 20) a = 4) an = 106 5) n-1 a₁ =1+(-1)" n+1 a-(+) (1-4) 6) = 7) a = 2n (-1)"+1 2n-1 21) an = n -A" 1/(Inn) 3n+1 22) a = 3n-1 1/n x" 23) a = , x>0 2n+1 3" x 6" 24) a = 2™" xn! 2n 8) a = n+1 πT 1 9) a„ = sin +- 2 n sin n 10) an = n 25) a = tanh(n) 26) a = 2n-1 27) a = tan(n) 1 -sin n n 11) a = 2" 28) an == " 1 + 2" In(n+1) 12) a = n (In n) 200 29) a = n 13) a = 8/n 14) a 1+ =(1+²)" 15) an 7 n = 10n 30) an-√√n²-n 1"1 31) adx nixarrow_forwardCalculate the angle of incidence of beam radiation on a collector located at (Latitude 17.40S) on June 15 at 1030hrs solar time. The collector is tilted at an angle of 200, with a surface azimuth angle of 150.arrow_forwardMechanical engineering, please don't use chatgpt. Strict warningarrow_forward
- Compute the mass fraction of eutectoid cementite in an iron-carbon alloy that contains 1.00 wt% C.arrow_forwardCompute the mass fraction of eutectoid cementite in an iron-carbon alloy that contains 1.00 wt% C.arrow_forward! Required information Mechanical engineering, don't use chatgpt. Thanks A 60-kip-in. torque T is applied to each of the cylinders shown. NOTE: This is a multi-part question. Once an answer is submitted, you will be unable to return to this part. 3 in. 4 in. (a) (b) Determine the inner diameter of the 4-in. diameter hollow cylinder shown, for which the maximum stress is the same as in part a. The inner diameter is in.arrow_forward
- Mechanical engineering, Don't use chatgpt. Strict warning.arrow_forward10:38 PM P 4136 54 A man Homework was due west for and 4km. He then changes directies walks on a bearing south-wes IS How far Point? of 1970 until he of his Starting Port Is he then from his stating What do you think about ... ||| Մ כarrow_forwardA simply supported T-shaped beam of 6m in length has to be designed to carry an inclined central point load W. Find the max- imum value of this load such that the maximum tensile and com- pression stresses on the beam do not exceed 30 and 60 respectively. N mm² N mm², 90 mm 80 mm Y W 60 mm 30° 10 mm 10 mm Xarrow_forward
- Elements Of ElectromagneticsMechanical EngineeringISBN:9780190698614Author:Sadiku, Matthew N. O.Publisher:Oxford University PressMechanics of Materials (10th Edition)Mechanical EngineeringISBN:9780134319650Author:Russell C. HibbelerPublisher:PEARSONThermodynamics: An Engineering ApproachMechanical EngineeringISBN:9781259822674Author:Yunus A. Cengel Dr., Michael A. BolesPublisher:McGraw-Hill Education
- Control Systems EngineeringMechanical EngineeringISBN:9781118170519Author:Norman S. NisePublisher:WILEYMechanics of Materials (MindTap Course List)Mechanical EngineeringISBN:9781337093347Author:Barry J. Goodno, James M. GerePublisher:Cengage LearningEngineering Mechanics: StaticsMechanical EngineeringISBN:9781118807330Author:James L. Meriam, L. G. Kraige, J. N. BoltonPublisher:WILEY





