Cody

Solution 1752757

Submitted on 16 Mar 2019
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
x1=[1 2 1]; y1=[1 2 2 4 5 6 6 8]; y_correct = [2.3333 3.3333 5.0000 6.6667 7.6667 8.6667]; assert(sum(abs(smooth1dconv(x1,y1)-y_correct))<0.001)

b = 5 x1 = 1 2 1 0 0 0 0 0 z = [] a = 2.3333 z = 2.3333 a = 2 z = 2.3333 2.0000 a = 0.6667 z = 2.3333 2.0000 0.6667 a = 0 z = 2.3333 2.0000 0.6667 0 a = 0 z = 2.3333 2.0000 0.6667 0 0 a = 0 z = 2.3333 2.0000 0.6667 0 0 0

Assertion failed.

2   Fail
x1=[1 2 1]; y1=[1 1 1 1 1 1 1 1]; y_correct = [1.3333 1.3333 1.3333 1.3333 1.3333 1.3333]; assert(sum(abs(smooth1dconv(x1,y1)-y_correct))<0.001)

b = 5 x1 = 1 2 1 0 0 0 0 0 z = [] a = 1.3333 z = 1.3333 a = 1 z = 1.3333 1.0000 a = 0.3333 z = 1.3333 1.0000 0.3333 a = 0 z = 1.3333 1.0000 0.3333 0 a = 0 z = 1.3333 1.0000 0.3333 0 0 a = 0 z = 1.3333 1.0000 0.3333 0 0 0

Assertion failed.