polyval: Evaluate a polynomial

Description Usage Arguments Value Author(s) See Also Examples

View source: R/filter.R

Description

Evaluate a polynomial at given points.

Usage

1

Arguments

coef

coefficients of the polynomial, defined in decreasing power.

z

the points at which to evaluate the polynomial.

Value

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

Author(s)

Tom Short

See Also

poly, roots

Examples

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

Example output

Attaching package: 'signal'

The following objects are masked from 'package:stats':

    filter, poly

[1] -1  2  7

signal documentation built on May 25, 2021, 3 p.m.

Related to polyval in signal...