Problem 236. newRMS

Solution 3255883

Submitted on 17 Oct 2020
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

Test Suite

Test Status Code Input and Output
1   Fail
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)

Undefined function 'rms' for input arguments of type 'double'. Error in newRMS (line 2) y = rms(x) Error in Test1 (line 3) y_new=round(newRMS(x)*10^6)/10^6;

Suggested Problems

More from this Author100

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!