Unity coefficient in symbolic polinomial

15 vues (au cours des 30 derniers jours)
Miguel Perez Andrade
Miguel Perez Andrade le 5 Juil 2018
Hello,
When working with symbolic polynomials, they are always expressed in the form
a_n*s^n+...a_1*s+a_0
is there a way to express the polynomial in the form
a_n*(s^n+...a_1'*s+a_0')
a_i'= a_i/a_n
I would find this useful as I'm working with transfer functions, and with lots of expressions it's time-consuming to make the factorization by hand. Thanks!

Réponse acceptée

Star Strider
Star Strider le 6 Juil 2018
This is one approach:
syms x s
f = 5*x^3 - 3*x^2 + 2*x - 1;
polynrm = @(p,v) vpa(poly2sym(poly(roots(sym2poly(p))), v));
a = polynrm(f,s)
a =
s^3 - 0.6*s^2 + 0.4*s - 0.2
This creates an anonymous function you can use to normalise the polynomials. The first argument is the polynomial, and the second is the variable you want to express it in.
This obviously only works with numeric coefficients. I could not find specific functions, or function options, to do this.

Plus de réponses (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by