What does the code: v = poly(1:n); accomplish?

I am attempting to create a program which will determine the effect of perturbations on root-finding methods. I have a particular function that I wish to view perturbed effects using epsilon.
That should be unrelated to the question: What does the code: v = poly(1:n); accomplish?

 Risposta accettata

Azzi Abdelmalek
Azzi Abdelmalek il 28 Gen 2013
Modificato: Azzi Abdelmalek il 28 Gen 2013
poly([2 3])=[1 -5 6] , note that (z-2)(z-3)=z^2-5z+6
Check this
a=poly(2:3)
b=roots(a)
% poly is the inverse function of roots

3 Commenti

I think I am understanding your response, thank you for that btw. So, if I said poly(1:3) that would be (z-1)(z-2)(z-3) = z^3 + -6z^2 + 11z - 6 = [1, -6, 11, -6]
"% poly is the inverse function of roots" Thank you, that was helpful. I created a small script that showed this as true. Therefore, as I understand it, by knowing the coefficients of the polynomial (from poly function) I can then use the roots function to find the roots corresponding to the coefficients of said polynomial?

Accedi per commentare.

Più risposte (0)

Categorie

Prodotti

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by