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;
power = 200*ones(1,3600);
P_avg_corr = 200;
NP_corr = 200;
[P_avg,NP] = cycling_norm_power(power);
??????????? really? 4 correct and 5 not?
Same problem as noted in the other comment. You get the correct P_avg here but not NP because the sprint is so short that the 30-second rolling average (applied twice) is rounded to the same answer. Unrounded P_avg answers for this routine and the correct routine are 131.3638 and 131.1111, respectively. Given that answers are being rounded, it may look wrong since the P_avg calculation appears to be right (due to rounding) while NP was wrong when both were actually wrong.
Maybe I'm wrong, but for sure the results in test 4 and 5 is NOT CORRECT
Note in the last paragraph of the explanation: "You will be provided with the 30-second rolling average power data set (vector)." In essence, your solution is calculating the 30-second rolling average of a 30-second rolling average data set.
Find all elements less than 0 or greater than 10 and replace them with NaN
Remove any row in which a NaN appears
Test if a Number is a Palindrome without using any String Operations
07 - Common functions and indexing 2
Convert given decimal number to binary number.
Singular Value Decomposition
Word Search Solver
Lights Out 13 - 5x5, three stages, x moves
Rumis Scorer 3
Pattern Recognition 2 - Known Unit Length, Various Array Length (including cell arrays)
Find the treasures in MATLAB Central and discover how the community can help you!
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Contact your local office