Cody

Solution 1992366

Submitted on 27 Oct 2019 by Nikolaos Nikolaou
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 = 3; coefficients = [-19, 7, -4, 6]; y_correct = 128; assert(isequal(your_fcn_name(x,coefficients),y_correct))

y = 128

2   Pass
x = 21; coefficients = [5, -4, 7, -2]; y_correct = -15514; assert(isequal(your_fcn_name(x,coefficients),y_correct))

y = -15514

3   Pass
x = [11:15]; a = [-10:-6]; b = [6:2:14]; c = [-14:2:-6]; d = [2:-1:-2]; y_correct = [1024, 87 -1568 -4151 -7896]; for i = 1:5 coefficients = [a(i) b(i) c(i) d(i)]; assert(isequal(your_fcn_name(x(i),coefficients),y_correct(i))) end

y = 1024 y = 87 y = -1568 y = -4151 y = -7896

Suggested Problems