Cody

Solution 1980372

Submitted on 17 Oct 2019 by Nikolaos Nikolaou
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 = [2 1]; y_correct = [1 1 1] ; assert(isequal(integrateMe(x),y_correct))

y = 1 1 0 y = 1 1 1

2   Pass
x = [2 1 9]; y_correct = [2/3 1/2 9 1] ; assert(isequal(integrateMe(x),y_correct))

y = 0.6667 0.5000 9.0000 0 y = 0.6667 0.5000 9.0000 1.0000

3   Pass
x = [3 1 0]; y_correct = [1 1/2 0 1] ; assert(isequal(integrateMe(x),y_correct))

y = 1.0000 0.5000 0 0 y = 1.0000 0.5000 0 1.0000

Suggested Problems

More from this Author43