
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)
- Problem 1 (65 pts, suggested time 50 mins). An elastic string of constant line tension1T is pinned at x = 0 and x = L. A constant distributed vertical force per unit length p(with units N/m) is applied to the string. Under this force, the string deflects by an amountv(x) from its undeformed (horizontal) state, as shown in the figure below.The PDE describing mechanical equilibrium for the string isddx Tdvdx− p = 0 . (1)(a) [5pts] Identify the BCs for the string and identify their type (essential/natural). Writedown the strong-form BVP for the string, including PDE and BCs.(b) [10pts] Find the analytical solution of the BVP in (a). Compute the exact deflectionof the midpoint v(L/2).(c) [15pts] Derive the weak-form BVP.(d) [5pts] What is the minimum number of linear elements necessary to compute the deflection of the midpoint?(e) [15pts] Write down the element stiffness matrix and the element force vector for eachelement.arrow_forwardProblem 1 (35 pts). An elastic string of constant line tension1 T is pinned at x = 0 andx = L. A constant distributed vertical force per unit length p (with units N/m) is appliedto the string. Under this force, the string deflects by an amount v(x) from its undeformed(horizontal) state, as shown in the figure below.Force equilibrium in the string requires thatdfdx − p = 0 , (1)where f(x) is the internal vertical force in the string, which is given byf = Tdvdx . (2)(a) [10pts] Write down the BVP (strong form) that the string deflection v(x) must satisfy.(b) [2pts] What order is the governing PDE in the BVP of (a)?(c) [3pts] Identify the type (essential/natural) of each boundary condition in (a).(d) [20pts] Find the analytical solution of the BVP in (a).arrow_forwardProblem 2 (25 pts, (suggested time 15 mins). An elastic string of line tension T andmass per unit length µ is pinned at x = 0 and x = L. The string is free to vibrate, and itsfirst vibration mode is shown below.In order to find the frequency of the first mode (or fundamental frequency), the string isdiscretized into a certain number of linear elements. The stiffness and mass matrices of thei-th element are, respectivelyESMi =TLi1 −1−1 1 EMMi =Liµ62 11 2 . (2)(a) [5pts] What is the minimum number of linear elements necessary to compute the fundamental frequency of the vibrating string?(b) [20pts] Assemble the global eigenvalue problem and find the fundamental frequency ofvibration of the stringarrow_forward
- I need part all parts please in detail (including f)arrow_forwardProblem 3 (10 pts, suggested time 5 mins). In class we considered the mutiphysics problem of thermal stresses in a rod. When using linear shape functions, we found that the stress in the rod is affected by unphysical oscillations like in the following plot E*(ux-a*T) 35000 30000 25000 20000 15000 10000 5000 -5000 -10000 0 Line Graph: E*(ux-a*T) MULT 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 Arc length (a) [10pts] What is the origin of this issue and how can we fix it?arrow_forwardanswer the questions and explain all of it in words. Ignore where it says screencast and in class explanationarrow_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





