Cody

Problem 2163. Evaluate Polynomial

Given a polynomial equation coefficients in a vector p, you have to return its value at x.

Example:

For inputs p and x

 p = [1 0 1]
 x = [1 4]

Output y is [1*1^2 + 1, 1*4^2 + 1] or

 y = [2 17]

Solution Stats

77.67% Correct | 22.33% Incorrect
Last solution submitted on Sep 19, 2017
Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

MATLAB Academy

New to MATLAB?

Learn MATLAB today!