root() function gives compelx solution for cubic equation. how to get the nearby real root?
    4 Ansichten (letzte 30 Tage)
  
       Ältere Kommentare anzeigen
    
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 Kommentare
  Walter Roberson
      
      
 am 25 Jun. 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.
Antworten (0)
Siehe auch
Kategorien
				Mehr zu Polynomials finden Sie in Help Center und File Exchange
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


