Unity coefficient in symbolic polinomial
16 views (last 30 days)
Show older comments
Miguel Perez Andrade
on 5 Jul 2018
Answered: Star Strider
on 6 Jul 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 Comments
Accepted Answer
Star Strider
on 6 Jul 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 Comments
More Answers (0)
See Also
Categories
Find more on Polynomials in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!