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?

 Respuesta aceptada

Azzi Abdelmalek
Azzi Abdelmalek el 28 de En. de 2013
Editada: Azzi Abdelmalek el 28 de En. de 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 comentarios

Paul
Paul el 28 de En. de 2013
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]
Azzi Abdelmalek
Azzi Abdelmalek el 28 de En. de 2013
Exact
Paul
Paul el 28 de En. de 2013
"% 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?

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Creating and Concatenating Matrices en Centro de ayuda y File Exchange.

Productos

Etiquetas

Preguntada:

el 28 de En. de 2013

Community Treasure Hunt

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

Start Hunting!

Translated by