Learn R Programming

pracma (version 1.9.9)

polytrans: Polynomial Transformation

Description

Transform a polynomial.

Usage

polytrans(p, q)

Arguments

p, q
vectors representing two polynomials.

Value

Vector representing a polynomial.

Details

Transforms polynomial p replacing occurences of x with another polynomial q in x.

See Also

polypow

Examples

Run this code
# (x+1)^2 + (x+1) + 1
polytrans(c(1, 1, 1), c(1, 1))    #=> 1 3 3
polytrans(c(1, 1, 1), c(-1, -1))  #=> 1 1 1

Run the code above in your browser using DataLab