Cody

# Problem 42692. Polynomial Evaluation

Solution 793743

Submitted on 13 Dec 2015 by FRANCISCO JAVIER
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 = 14 y = 49 y = 128

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

y = -35 y = -739 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 = 8 y = 94 y = 1024 y = 0 y = 8 y = 87 y = -10 y = -120 y = -1568 y = -22 y = -296 y = -4151 y = -36 y = -526 y = -7896

### Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!