Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Recreational and elite runners targeting a certain race distance are often interested in the average pace they are required to run to reach a
Recreational and elite runners targeting a certain race distance are often interested in the average pace they are required to run to reach a certain time goal. Complete the below function required_pace that takes a runner's goal time (expressed in hours, minutes and seconds) and race distance (expressed in kilometres) as inputs and returns the required average pace (expressed in hours, minutes and seconds per kilometre) required to finish precisely in the goal time. Your code must use MATLAB's floor function. Consult the MATLAB documentation on the floor function if you need help using this function. Example: If a runner's goal is to run 33 mins and 3 secs for a 10km race the pace required is 3 mins and 18.3 secs per km. In this case, the code: time = [0,33,31; % [hrs,mins, secs] distance = 10; % kms pace = required_pace(time, distance); should return: pace = (0,3,18.3] % (hrs,mins, secs] per km Function e A Save C Reset E MATLAB Documentation 1 function pace = required_pace(time,distance)
Step by Step Solution
★★★★★
3.37 Rating (147 Votes )
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