Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Can you solve this problem in MATLAB? The following are formulas for calculating the Training Heart Rate (THR: THR = (MHR-RHR) INT EN + RHR

image text in transcribed

Can you solve this problem in MATLAB?

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/ For male: MHR0.033(age-104.3) wiki/Heart_rate) 203.7 1+ted.oas(age-10433, for female: MHR- 190.2 1+e0.0453(age-107.5) 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 HW5P2 to determine the required THR, that 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) uses if-elseif structure to assign values to MHR based on the gender. uses switch-case structure to assign values to INTEN based on the fitness level. ii. ii. he 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" xcx is for numbers, FMFM is for (male or female) and HMI is for (high, medium or low) (2 pts) Use the program for determining the train individuals: ing heart rate for the following two 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_2

Step: 3

blur-text-image_3

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

OCA Oracle Database SQL Exam Guide Exam 1Z0-071

Authors: Steve O'Hearn

1st Edition

1259585492, 978-1259585494

More Books

Students also viewed these Databases questions

Question

Find dy/dx by implicit differentiation. 2x 3 + x 2 y xy 3 = 2

Answered: 1 week ago

Question

=+2. How will you measure acceptance objectives?

Answered: 1 week ago

Question

a. What is the purpose of the team?

Answered: 1 week ago

Question

a. How are members selected to join the team?

Answered: 1 week ago