You are developing a program to record information about patients at a doctor’s office. Write the code to accomplish the following goals.
Section 1: Patient Information
Create a single-column cell array named Patients containing the names shown in the menu.
Determine the number of names in Patients and place the result in NumPat. Your code must determine how many names there are in Patients; DO NOT hard-code this value. Your code should still work correctly if the number of names stored in Patients changes.
Ask the nurse to choose the patient name being seen during an office visit from a menu of patient names, located in the cell array Patients. A menu with the current five names is shown here as an example.
Ask the nurse to enter the selected patient’s weight in pounds. This numeric value should be placed in a column
Create a text string named Gender consisting of a series of the letter X. The length of this text string should equal the number of names in Patients. For example, with the values stored in Patients given above, Gender would contain xxxxx.
Ask the nurse to enter the patient’s gender as a single letter chosen from M, F, T. (Some folks might argue vociferously concerning what categories should be included here, but this is just a homework assignment, not a philosophical discussion of gender identity and its classification, so chill out.) The letter typed by the nurse should REPLACE the corresponding X in the text string Gender. Thus if the nurse had selected Thomas Clemson and typed an M for gender, the text string Gender would then contain XXXMX , assuming no other patients’ information had been previously entered. Again, the nurse does not specify the location in the text string, the code does that.
Ask the nurse to enter the selected patient’s temperature [°F]. Place this numeric value in the corresponding element of a column vector named Temp. Thus if Thomas Clemson was selected and had a temperature of 98.7"F, the fourth element of Temp would then contain 98.7.
Section 2: Basic Report
Print a report on the screen similar to the following for the selected patient. Note that there is a blank line between the first line and the second line, and a blank line between the last line and the MATLAB prompt (>>). Also the last digit of the weight should be aligned beneath the "h" in "Weight", the gender identifier should be aligned under the letter d of "Gender", and the last digit of the temperature should be aligned under the "a" of "Temperature"
Patient: Thomas Clemson
Weight Gender Temperature
195 M 98.7
>>
Trending nowThis is a popular solution!
Chapter 17 Solutions
Thinking Like an Engineer: An Active Learning Approach (4th Edition)
- Draw left view of the first orthographic projectionarrow_forwardSketch and Describe a timing diagram for a 2 stroke diesel engine emphasis on the 2 stroke as my last answer explained 4 stroke please include a diagram or sketch.arrow_forwardA 4 ft 200 Ib 1000 Ib.ft C 2 ft 350 Ib - за в 2.5 ft 150 Ib 250 Ib 375 300 Ib Replace the force system acting on the frame. shown in the figure by a resultant force (magnitude and direction), and specify where its line of action intersects member (AB), measured from point (A).arrow_forward
- A continuous flow calorimeter was used to obtain the calorific value of a sample of fuel and the following data collected: Mass of fuel: 2.25 kgInlet water temperature: 11 ° COutlet water temperature 60 ° CQuantity of water: 360 Liters Calorimeter efficiency: 85%Calculate the calorific value of the sample ( kJ / kg ). ive submitted this question twice and have gotten two way different answers. looking for some help thanksarrow_forward15 kg of steel ball bearings at 100 ° C is immersed in 25 kg of water at 20 ° C . Assuming no loss of heat to or from the container, calculate the final temperature of the water after equilibrium has been attained.Specific heat of steel: 0.4857 kJ / kg / ° KSpecific heat of water: 4.187 kJ / kg / ° Karrow_forwardSketch and explain a PV Diagram and a Temperature Entropy Diagram for a 4 stroke diesel enginearrow_forward
- A continuous flow calorimeter was used to obtain the calorific value of a sample of fuel and the following data collected: Mass of fuel: 2.25 kgInlet water temperature: 11 ° COutlet water temperature 60 ° CQuantity of water: 360 Liters Calorimeter efficiency: 85%Calculate the calorific value of the sample ( kJ / kg ).arrow_forwardChapter 12 - Lecture Notes.pptx: (MAE 272-01) (SP25) DY... Scoresarrow_forwardmylabmastering.pearson.com Chapter 12 - Lecture Notes.pptx: (MAE 272-01) (SP25) DY... P Pearson MyLab and Mastering Scoresarrow_forwardanswer the fallowing Brake Specific Fuel Consumption - 0.3 kg/kwh, Mechanical Efficiency- 90% Calorific Value of Fuel -45 MJ/kg. Given these values, find the indicated power, indicated thermal efficiency and brake thermal efficiencyarrow_forwardProblem 6. The circular plate shown rotates about its vertical diameter. At the instant shown, the angular velocity ₁ of the plate is 10 rad/s and is decreasing at the rate of 25 rad/s². The disk lies in the XY plane and Point D of strap CD moves upward. The relative speed u of Point D of strap CD is 1.5 m/s and is decreasing at the rate of 3 m/s². Determine (a) the velocity of D, (b) the acceleration of D. Answers: =0.75 +1.299]-1.732k m/s a=-28.6 +3.03-10.67k m/s² 200 mm x Zarrow_forwardProblem 1. The flywheel A has an angular velocity o 5 rad/s. Link AB is connected via ball and socket joints to the flywheel at A and a slider at B. Find the angular velocity of link AB and the velocity of slider B at this instant. (Partial Answer: @ABN = -2î + 2.25; red Z -1.2 ft C -7 Y -1.5 ft- B 2.0 ftarrow_forwardarrow_back_iosSEE MORE QUESTIONSarrow_forward_iosRecommended textbooks for you
- 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
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 EducationControl 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