Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The following are formulas for calculating the Training Heart Rate (THR): = ( ) + R MATLAB QUESTION The following are formulas for calculating the

image text in transcribed

The following are formulas for calculating the Training Heart Rate (THR): = ( ) + R

MATLAB QUESTION

The following are formulas for calculating the Training Heart Rate (THR) THR = (MHR-RHR) INT EN + RHR where MHR is the maximum heart rate given by (https://en.wikipedia.org/wiki/Heart_rate) 203.7 190.2 1+e0.0453(age-107.5) For male: RHR is the resting heart rate, and INTEN is the fitness leve (0.55 for low, 0.65 for medium, and 0.8 for high fitness) (13 pts) Write a program in a script file HW5P2 to determine the required THR, that t0O33age-10, for female: MHR- i. asks the user to enter his/her a. gender, M (for male) or F (for female) b. age (number), c. resting heart rate (number), and d. fitness level (low, medium, or high) ii. uses if-elseif structure to assign values to MHR based on the gender. ii. uses switch-case structure to assign values to INTEN based on the fitness level. iv. If the program did not recognize the gender or fitness level entered, the program must through a message Invalid entry, check your input and try again.' using the error0 function in MATLAB and stop. Check the help of the error function in MATLAB to know how it works For the case of no errors, the program determines and displays the training heart rate (rounded to the nearest integer), as v. "For a XX year-old FMFM with XX resting heart rate and HML fitness level, the training heart rate is Xx" xx is for numbers, FMFM is for (male or female) and HML is for (high, medium or low) (2 pts) Use the program for determining the training heart rate for the following two individuals 1. 2. 3. A 19-year-old male, resting heart rate of 63, and medium fitness level. A 20-year-old female, resting heart rate of 64, and high fitness level. A 45-year-old female, resting heart rate of 59, and medium fitness level. Enter female as "K" not F. The program must through an error for this case A 45-year-old male, resting heart rate of 59, and med fitness level. Enter medium as "med", abbreviated. The program must through an error for this case 4

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Semantics In Databases Second International Workshop Dagstuhl Castle Germany January 2001 Revised Papers Lncs 2582

Authors: Leopoldo Bertossi ,Gyula O.H. Katona ,Klaus-Dieter Schewe ,Bernhard Thalheim

2003rd Edition

3540009574, 978-3540009573

More Books

Students also viewed these Databases questions

Question

How do team level and team diversity affect team performance?

Answered: 1 week ago