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 Solvers44
Suggested Problems
-
Find the alphabetic word product
3470 Solvers
-
2279 Solvers
-
Create an n-by-n null matrix and fill with ones certain positions
734 Solvers
-
516 Solvers
-
Find the index of n in magic(n)
275 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))