In cycling, a power meter is an indispensable tool to record power output (in Watts) and measure fitness gains and performance metrics. When analyzing the data though, many different workouts can yield approximately the same average power, despite major differences between workouts (e.g., a long steady effort vs. sprints or intervals). Normalized power (NP) is a method to measure the effect of more intense efforts on the overall workout. NP is calculated by the following four steps (from Training and Racing with a Power Meter by Allen and Coggan):
- Calculate a 30-second rolling average of the power data
- Raise these values to the fourth power
- Average the resulting values
- Take the fourth root of the result
You will be provided with the 30-second rolling average power data set (vector). Write a function to return the average power (using the rolling average data) and the normalized power using steps 2–4 above. Round the values to the nearest integer.
Solution Stats
Problem Comments
Solution Comments
Show commentsProblem Recent Solvers41
Suggested Problems
-
given 3 sides, find area of this triangle
818 Solvers
-
Determine Whether an array is empty
808 Solvers
-
Make a run-length companion vector
656 Solvers
-
Convert Two Character String into a Binary Vector
232 Solvers
-
Side of an equilateral triangle
6868 Solvers
More from this Author139
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
I don't understand what I'm looking at, Ive attempted to add the code from a solution, but it seems like I'm missing something crutial...
function [P_avg,NP] = cycling_norm_power(power)
P_avg = 0;
NP = 0;
%% steady
power = 200*ones(1,3600);
P_avg_corr = 200;
NP_corr = 200;
[P_avg,NP] = cycling_norm_power(power);
assert(isequal(P_avg_corr,P_avg))
assert(isequal(NP_corr,NP))