Learn R Programming

control (version 0.2.5)

polysub: Subtracting Polynomials

Description

Subtract two polynomials given as vectors

Usage

polysub(a, b)

Arguments

a

Vector representing first polynomial.

b

Vector representing second polynomial.

Value

Returns a Vector representing the resulting polynomial.

Details

Simply calls polyadd from pracma package in the following manner: pracma::polyadd(a, -b)

Examples

Run this code
# NOT RUN {
polysub(c(1, 1, 1), 1)
polysub(c(1, 1, 1), c(0, 0, 1))

# }

Run the code above in your browser using DataLab