polysub function

Subtracting Polynomials

Subtracting Polynomials

Subtract two polynomials given as vectors

polysub(a, b)

Arguments

  • a: Vector representing first polynomial.
  • b: Vector representing second polynomial.

Returns

Returns a Vector representing the resulting polynomial.

Details

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

Examples

polysub(c(1, 1, 1), 1) polysub(c(1, 1, 1), c(0, 0, 1))
  • Maintainer: Ben C. Ubah
  • License: GPL-2
  • Last published: 2017-12-12

Useful links