We explained the finding roots of a polynomial in Matlab® here. Also, you can do the same thing in the reverse direction. You can find polynomes from their roots in Matlab® with the ‘poly()’ command. Here, we explained how to find a specific polynomial from its known roots with the ‘poly()’ command in Matlab®, with a very basic example.
On this post
How To Use ‘poly()’ Command In Matlab®?
>> a = [0 2 1-j 1+j] b = poly(a) c = poly([1 3 3-j 3+j]); d = poly(c) a = Columns 1 through 2 0.0000 + 0.0000i 2.0000 + 0.0000i Columns 3 through 4 1.0000 - 1.0000i 1.0000 + 1.0000i b = 1 -4 6 -4 0 d = Columns 1 through 4 1 0 -2867 39486 Columns 5 through 6 607180 -643800 >>
To find a polynomial from its known roots in Matlab®, you need to define all the roots in a vector. For example, we defined 4 roots of a polynomial in vector ‘a’ above. What we did is, we typed the polynomial ‘a’ into the poly() command, then assigned it to a variable ‘b’. As you see above again, the result. This vector ‘b’ represents the unknown polynomial that is calculated from its roots.
YOU CAN LEARN MatLab® IN MECHANICAL BASE; Click And Start To Learn MatLab®!
Also, you can directly type all the roots inside the parenthesis of poly() command in Matlab®.
The logic of these results that represent polynomials, all the elements represents the coefficients of the polynomial that has one variable. For example result, ‘b’ represents the polynomial of x^4-4x^3+6x^2-4x^. All the coefficients are represented by an element in vectors ‘b’ and ‘d’, from left to right.
Finding out unknown polynomial from its known roots is very easy like above with the ‘poly()’ command in Matlab®.
Do not forget to leave your comments and questions about the ‘poly()’ command in Matlab® to find polynomials from its roots below. Your feedback is very important for us.
This article is prepared for completely educative and informative purposes. Images used courtesy of Matlab®
Your precious feedbacks are very important to us.