| Symbolic Math Toolbox™ | ![]() |
c = sym2poly(s)
c = sym2poly(s) returns a row vector containing the numeric coefficients of a symbolic polynomial. The coefficients are ordered in descending powers of the polynomial's independent variable. In other words, the vector's first entry contains the coefficient of the polynomial's highest term; the second entry, the coefficient of the second highest term; and so on.
The commands
syms x u v sym2poly(x^3 - 2*x - 5)
return
1 0 -2 -5
while sym2poly(u^4 - 3 + 5*u^2) returns
1 0 5 0 -3
and sym2poly(sin(pi/6)*v + exp(1)*v^2) returns
2.7183 0.5000 0
poly2sym, subs, sym, polyval in the online MATLAB Function Reference
![]() | syms | symsum | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |