%% Evaluate Polynomial at Several Points
% Evaluate the polynomial p\left(x\right)=3x^2 +2x+1 at the points x=5,7,9. The polynomial coefficients can be represented by the vector [3 2 1].

p = [3 2 1];
x = [5 7 9];
y = polyval(p,x)

% Copyright 2018 The MathWorks, Inc.