Compute the roots of a general nth-degree polynomial

조회 수: 8 (최근 30일)
Jiapeng
Jiapeng 2022년 12월 8일
답변: Sam Chak 2022년 12월 8일
A = [ ];
a = compan(A);
e = eig(a);
I am trying to find the roots of a general polynomial of degree n using the eigenvalues of the companion matrix. What statement should I use next?
  댓글 수: 1
Walter Roberson
Walter Roberson 2022년 12월 8일
If you are trying to find numeric roots then why not use roots()?

댓글을 달려면 로그인하십시오.

채택된 답변

Sam Chak
Sam Chak 2022년 12월 8일
The following article shows you a few methods to find the roots of a polynomial.
A = 1:2:7
A = 1×4
1 3 5 7
a = compan(A)
a = 3×3
-3 -5 -7 1 0 0 0 1 0
eig(a)
ans =
-2.1795 + 0.0000i -0.4102 + 1.7445i -0.4102 - 1.7445i
roots(A)
ans =
-2.1795 + 0.0000i -0.4102 + 1.7445i -0.4102 - 1.7445i

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Linear Algebra에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by