math_polyCoef: Polynomial coefficients

View source: R/math.R

math_polyCoefR Documentation

Polynomial coefficients

Description

Calculates the polynomial coefficients from a polynomial equation. The variable var can be chosen. The order of the terms does not matter.

Usage

math_polyCoef(equation, variable = "x")

Arguments

equation

polynomial equation string

variable

variable of the polynomial equation

Value

vector with polynomial coefficients.

Author(s)

Florian Wagner florian.wagner@wagnius.ch

Examples

"-20*x + 4*x^2 + 5*x^3 + x^4"|>math_polyCoef()
"4*x^2 -  20*x + 5*x^3 + x^4"|>math_polyCoef()
"4*x^8 -  5*x^3 + x^4-0.2"|>math_polyCoef()
"3*z^3"|>math_polyCoef("z")

wagnius-GmbH/slvwagner documentation built on Jan. 19, 2025, 7:10 a.m.