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?

 采纳的回答

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 个评论

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?

请先登录,再进行评论。

更多回答(0 个)

类别

在 帮助中心 和 File Exchange 中查找有关 Creating and Concatenating Matrices 的更多信息

产品

Community Treasure Hunt

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

Start Hunting!

Translated by