Cody

Solution 1850189

Submitted on 16 Jun 2019 by Bae
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   Pass
x = [1]; y_correct = [1,1,1]; assert(isequal(means(x),y_correct))

ans = 1 1 1

2   Pass
x = [1,4]; y_correct = [2.5,2,8/5]; assert(isequal(means(x),y_correct))

ans = 2.5000 2.0000 1.6000

3   Pass
x = 1:10; y = means(x); y_correct = [5.5,nthroot(3628800,10),25200/7381]; for i = 1:3 assert(abs(y(i)-y_correct(i))<1e-4) end

ans = 5.5000 4.5287 3.4142

Suggested Problems

More from this Author9