Cody

# Problem 72. Interpolator

Solution 2098295

Submitted on 19 Jan 2020 by zaid aldailami
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))

c = 4 5 6 7 8 9 10 d = 1 2 3 e = 0 f = 1 cc = 4 6 8 10 12 14 16 18 20 dd = 2 ff = 2 number = 1 2 3 relationship = 2 the_number = 0 vb = 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))

c = 4 5 6 7 8 9 10 d = 1 2 3 e = 0.5000 f = 1 cc = 4 6 8 10 12 14 16 18 20 dd = 2 ff = 2 number = 1 2 3 relationship = 2 the_number = 1 vb = 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))

c = 5 6 7 10 d = 0 1 e = 2 f = 4 cc = 5 7 9 100 dd = 2 3 ff = 2 number = 1 2 relationship = 0.5000 the_number = 1 vb = 4