signal (version 1.8-0)

polyval: Evaluate a polynomial

Description

Evaluate a polynomial at given points.

Usage

polyval(coef, z)

Value

An array of length(z), the polynomial evaluated at each element of z.

Arguments

coef

coefficients of the polynomial, defined in decreasing power.

z

the points at which to evaluate the polynomial.

Author

Tom Short

See Also

poly, roots

Examples

Run this code
polyval(c(1, 0, -2), 1:3)  # s^2 - 2 

Run the code above in your browser using DataLab