Cody

# Problem 43637. For given vectors x,y find coresponding spline coefficients.

Solution 1246679

Submitted on 5 Aug 2017
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 =[ -3 -2 0 2 3] y =[ 0 0 1 0 0] y_correct=[-3 -2 0 2 3]; assert(isequal(SplCoef(x,y),y_correct))

x = -3 -2 0 2 3 y = 0 0 1 0 0

Output argument "ans" (and maybe others) not assigned during call to "SplCoef". Error in Test1 (line 4) assert(isequal(SplCoef(x,y),y_correct))

2   Fail
x = 1:0.5:5 y =sin(x) y_correct=[ 1.0000 1.5000 2.0000 2.5000 3.0000 3.5000 4.0000 4.5000 5.0000]; assert(isequal(SplCoef(x,y),y_correct))

x = 1.0000 1.5000 2.0000 2.5000 3.0000 3.5000 4.0000 4.5000 5.0000 y = 0.8415 0.9975 0.9093 0.5985 0.1411 -0.3508 -0.7568 -0.9775 -0.9589

Output argument "ans" (and maybe others) not assigned during call to "SplCoef". Error in Test2 (line 4) assert(isequal(SplCoef(x,y),y_correct))