Cody

Solution 1903632

Submitted on 18 Aug 2019 by Tetsuji Tsuda
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
a = 3; alpha = 1 : 1 : 10; beta = 2 : 2 : 20; b = 6; out = interpolator(a, alpha, beta); assert(isequal(out(:), b))

i = 3 x = [] y = [] x = 2 3 y = 4 6 p = 2.0000 -0.0000 vb = int32 6

2   Pass
a = 3.5; alpha = 1 : 1 : 10; beta = 2 : 2 : 20; b = 7; out = interpolator(a, alpha, beta); assert(isequal(out(:), b))

i = 3 x = [] y = [] x = 3 4 y = 6 8 p = 2.0000 0.0000 vb = int32 7

3   Pass
a = 3; alpha = [0 1 5 6 7 10]; beta = [2 3 5 7 9 100]; b = 4; out = interpolator(a, alpha, beta); assert(isequal(out(:), b))

i = 2 x = [] y = [] x = 1 5 y = 3 5 p = 0.5000 2.5000 vb = int32 4

Suggested Problems

More from this Author95