what is method inside roots in matlab

Answers (1)

From the documentation:
The algorithm simply involves computing the eigenvalues of the companion matrix:
A = diag(ones(n-1,1),-1);
A(1,:) = -c(2:n+1)./c(1);
eig(A)
It is possible to prove that the results produced are the exact eigenvalues of a matrix within roundoff error of the companion matrix A, but this does not mean that they are the exact roots of a polynomial with coefficients within roundoff error of those in c.
Best wishes
Torsten.

2 Comments

thank u ,what excatly means method insdie roots this one doesnt excute in matlab
Why not ?
c(1)=1;
c(2)=0;
c(3)=-2;
c(4)=-5;
n=3;
A = diag(ones(n-1,1),-1);
A(1,:) = -c(2:n+1)./c(1);
eig(A)
for your example.
Best wishes
Torsten.

Sign in to comment.

Categories

Find more on MATLAB in Help Center and File Exchange

Tags

No tags entered yet.

Asked:

on 18 Feb 2015

Commented:

on 18 Feb 2015

Community Treasure Hunt

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

Start Hunting!