roots

roots — roots of polynomials

Calling sequence

[x]=roots(p)  

Parameters

p : polynomial with real or complex coefficients

Description

x=roots(p) returns in the complex vector x the roots of the polynomial p. Degree of p must be <=100.

Examples



p=poly([0,10,1+%i,1-%i],'x');
roots(p)
A=rand(3,3);roots(poly(A,'x'))    // Evals by characteristic polynomial
spec(A) 
 
  

See also

poly