Effacer les filtres
Effacer les filtres

root() function gives compelx solution for cubic equation. how to get the nearby real root?

2 vues (au cours des 30 derniers jours)
Dear All:
i have a cubic equation and the coefficients are set already. But it always gives me the complex roots (all of them).
As i know, root() function of the matlab (in practice and theory) gives the very approximate roots for any polynomial that has more than quadratic.
So, is there anyway i can force the root to give me the most possible real roots?.
Thanks.
  5 commentaires
mirewuti muhetaer
mirewuti muhetaer le 25 Juin 2020
Dear @Walter Roberson:
Thanks for the clarification.
When i read the matlab root documents and other online documents, also based on what i learned in the past, for the polynomials (except quadratic), Newton's method is used to get the roots. That is the reason, i though matlab may also do this and there is kind of tiny difference between the actual solution and roots given by matlab root() function.
Now, it is clear to me that i was wrong.
Really appreciated.
Walter Roberson
Walter Roberson le 25 Juin 2020
The roots function considers p to be a vector with n+1 elements representing the nth degree characteristic polynomial of an n-by-n matrix, A. The roots of the polynomial are calculated by computing the eigenvalues of the companion matrix, A.
Not Newton's method.

Connectez-vous pour commenter.

Réponses (0)

Catégories

En savoir plus sur Polynomials dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by