sym2poly: Extracting coefficients from polynomials

Description Usage Arguments Value Author(s) Examples

View source: R/Ryacas-all.R

Description

sym2ploy can extract coefficients from polynomials and gives the roots of polynomials. The roots is calculated from polyroot and the polyroots function.

Usage

1
2
3
sym2poly(x, var = "x")

sym2coef(x, var = "x")

Arguments

x

The polynomials,for examples, '3x^2 + 6x^6 + 2 + 25*x'.

var,

The var from polynomials, for examples, the var of '3x^2 + x^6 + x8 + x*5^2' is 'x'.

Value

sym2poly() returns Coefficients and the roots. sym2coef() only returns coefficients.

Author(s)

Chai

Examples

1
2
sym2poly("3*x^2 + x^5 + x*8")
sym2poly("3*x^2 + x^5 + 2*x^5")

tsiamut/ch documentation built on Dec. 23, 2021, 12:58 p.m.