Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Using Matlab to solve it , Please. The following are formulas for calculating the Training Heart Rate (THR) THR = (MHR-RHR) INT EN + RHR

image text in transcribed

image text in transcribed

Using Matlab to solve it , Please.

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) For male: MHR RHR is the resting heart rate, and INTEN is the fitness level (0.55 for low, 0.65 for medium, and 0.8 for high fitness) (13 pts) Write a program in a script file HWSP2 to determine the required THR, that 203.7 te0.oa1043), for female: MHR- 190.2 1+e0.0453(age-107.5) i. asks the user to enter his/her a. b. c. d. gender, M (for male) or F (for female) age (number), resting heart rate (number), and fitness level (low, medium, or high) ii. usesif-elseif structure to assign values to MHR based on the gender iii. 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 errorO function in MATLAB and stop. Check the help of the error function in MATLAB to know how it works v. For the case of no errors, the program determines and displays the training heart rate (rounded to the nearest integer), as "For a XX year-old FMFM with XX resting heart rate and HMI fitness level, the training heart rate is XX" XX is for numbers, MFM 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. A 19-year-old male, resting heart rate of 63, and medium fitness level. 2. A 20-year-old female, resting heart rate of 64, and high fitness level 3. 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

Database Basics Computer EngineeringInformation Warehouse Basics From Science

Authors: Odiljon Jakbarov ,Anvarkhan Majidov

1st Edition

620675183X, 978-6206751830

More Books

Students also viewed these Databases questions

Question

9. I rarely count on good things happening to me.

Answered: 1 week ago

Question

1. What are the pros and cons of diversity for an organisation?

Answered: 1 week ago

Question

1. Explain the concept of diversity and equality in the workplace.

Answered: 1 week ago