poly2str: Print Polynomial

Description Usage Arguments Details Value Examples

Description

Print polynomial as a character string.

Usage

1
poly2str(p, svar = "x", smul = "*", d = options("digits")$digits)

Arguments

p

numeric vector representing a polynomial

svar

character representing the unknown, default x.

smul

multiplication symbol, default *.

d

significant digits, default options("digits").

Details

Modified from package *pracma*. Modification: To hide any coefficient and power that is equal to 1 So that instead of '1s^3' we have 's^3' and instead of 's^1', we have 's'

Value

Returns the usual string representing a polynomial in mathematics.

Examples

1
poly2str(c(2, -3, 1, 20, -11))

control documentation built on May 1, 2019, 7:33 p.m.