Cody

Solution 802613

Submitted on 7 Jan 2016 by Duane Hanselman
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))

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

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