FUNCTION REFERENCE
roots
Roots of a polynomial given by its coefficients.
Roots of a polynomial given by its coefficients.
Syntax
r = roots(p)Leading zeros are dropped and trailing zeros give roots at 0. The other
roots are the eigenvalues of the companion matrix. r is a column and is
complex only when some root has a nonzero imaginary part.
Example
roots([1 -3 2]) % [2; 1]Differences from MATLAB: degree up to 1000. The order of roots with the same
size can differ from MATLAB. Complex coefficients use the engine's eig of the
companion matrix; the last digit and the order can differ from MATLAB's MKL.
These are the engine’s help pages. Each page keeps its compatibility notes. File operations are unavailable in the browser.