polyval
Evaluate a polynomial.
Syntax
y = polyval(p,x)
y = polyval(p,x,[],mu)
Inputs
- p
- The coefficients of the polynomial to be evaluated, in descending order.
- x
- The values at which to evaluate the polynomial.
- mu
- Shift and scale factors to evaluate the polynomial for (x-mu(1))/mu(2).
Outputs
- y
- The evaluated polynomial values.
Example
Evaluate x^2 + 5x + 6 at various values.
y = polyval([1,5,6],[0,1,2,3,4,5])
y = [Matrix] 1 x 6
6 12 20 30 42 56