Answered step by step
Verified Expert Solution
Question
1 Approved Answer
1. The following are formulas for calculating the training heart rate (THR): THR=(MHR-RHR). INTEN + RH R where MHR is the maximum heart rate
1. The following are formulas for calculating the training heart rate (THR): THR=(MHR-RHR). INTEN + RH R where MHR is the maximum heart rate given by For males: 203.7 1+0.033(age-104.3) For females: MHR= MHR 190.2 1+ 0.0453(age-107.5) RHR is the resting heart rate, and INTEN the fitness level (0.55 for low, 0.65 for medium, and 0.8 for high fitness). (a) Write an anonymous function to calculate the THR. (b) Write a user-defined function to calculate MHR. num- (c) You are given a simulated data file named 'personalinfo'xlsx' that contains ID nur ber (first column), age(second coulumn), gender(third column, 0: Male; 1: Female), resting heart rate (forth column) and fitness level (fifth column). Write a program in a script file that determines the THR. The program reads the personal information from data file, calculate THR by calling anonymous function in a) and user-defined function in b), and display the training heart rate (rounded to the nearest integer). Use above question as reference.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started