Cody

Solution 1692520

Submitted on 14 Dec 2018
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 = 1; a=1:3; y_correct = 6; assert(isequal(Poly(x,a),y_correct))

ans = 6

2   Fail
x = 0; a=1:9; y_correct = 1; assert(isequal(Poly(x,a),y_correct))

ans = 9

Assertion failed.

3   Fail
x = 0; a=3:9; y_correct = 3; assert(isequal(Poly(x,a),y_correct))

ans = 9

Assertion failed.

4   Pass
x = -1; a=[7,12,2]; y_correct = -3; assert(isequal(Poly(x,a),y_correct))

ans = -3