Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
x = rand(1,10^6);
tic;
y_new=round(newRMS(x)*10^6)/10^6;
t_new=toc;
tic;
y_correct = round(sqrt(var(x,1)+mean(x)^2)*10^6)/10^6;
t_correct=toc;
assert(isequal(y_new,y_correct))
assert(t_new<t_correct)
ans =
0.5771
|
27998 Solvers
Arrange Vector in descending order
4080 Solvers
1882 Solvers
Vectorizing, too easy or too hard?
128 Solvers
2814 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!