_:n7c321a221b1440ecba14d6ef863c5a04xb0
<http://schema.org/articleBody>
"\nIn general,&nbsp;polynomials&nbsp;are defined with their coefficients in MatLab®. Sometimes, if you defined a polynomial or if you obtained a polynomial- from another calculation, you need to take its coefficients to obtain Matlab® polynomial to use it in other functions or calculations.&nbsp;\n\n\n\nYou can do this by using the 'sym2poly()' command in Matlab®. Here, we explain how to use the 'sim2poly()' command in Matlab® with a very basic example below, which is executed in the Matlab® command window.&nbsp;\n\n\n\nHow To Use 'sym2poly()' Command In MatLab®?&nbsp;\n\n\n\n&gt;&gt; syms a \ny = a^5+2*a^4+a^2+8*a+3;\nsym2poly(y)\n\nans =\n\n     1     2     0     1     8     3\n\n&gt;&gt; \n\n\n\nIn the example above which is executed in MatLab®, we created a symbolic variable 'a' to obtain our polynomial from it with&nbsp;the 'syms' command.&nbsp;By using this variable, we obtained our polynomial. And we want to obtain the coefficients of this polynomial.&nbsp;\n\n\n\nWe simply typed the polynomial inside the 'sym2poly()' command then hit the 'Enter' key. As an answer, you can see the coefficients of polynomial from left to right order.&nbsp;\n\n\n\nConclusion\n\n\n\nSo, it is very basic to use the 'sym2poly()' command in Matlab® to obtain coefficients of polynomials.&nbsp;\n\n\n\nYOU CAN LEARN MatLab® IN MECHANICAL BASE; Click And Start To Learn MatLab®!\n\n\n\nDo not forget to leave your comments and questions below about the use of the 'sym2poly()' command in Matlab® below.&nbsp;\n\n\n\nIf you want further coding examples about the 'sym2poly()' command in Matlab®, inform us in the comments.\n\n\n\nThis article is prepared for completely educative and informative purposes.\n\n\n\nYour precious feedbacks are very important to us.\n"
<https://mechanicalbase.com/indexing-the-coefficients-of-polynomials-in-matlab-with-sym2poly-command/>