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 Solvers45
Suggested Problems
-
Replace NaNs with the number that appears to its left in the row.
3073 Solvers
-
24296 Solvers
-
Create a square matrix of multiples
502 Solvers
-
calculate linear convolution two vectors
145 Solvers
-
Matlab Basics - Assigning Variables
207 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))