Unity coefficient in symbolic polinomial
15 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Miguel Perez Andrade
le 5 Juil 2018
Réponse apportée : Star Strider
le 6 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!
0 commentaires
Réponse acceptée
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.
0 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Polynomials dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!