A given polynomial with multiple roots is solved by the routine
Z = polyroots(p), where
Input: p polynomial coefficient vector, real or complex.
Output: Z root-multiplicity pairs.
The MATLAB source code is very compact, using only basic MATLAB built-in functions, and existing double precision.
A short routine p = polyget(A) is also provided for creating a test polynomial coefficient vector.
This simple routine gives amazingly the expected results for test polynomials of very high degree and multiplicity, such as
p(x) = (x -123456789)^9876
p(x) = (x^8-1)^1000
p(x) = (x^100-1)^100
p(x) = (x^6 -1) *(x^5 -1)^2*(x^4 -1)^3*(x^3 -1)^4*(x^2 -1)^5*(x -1)^6
p(x) = (x-1+2i)^9 *(z+3-4i)^8 *(z-5-6i)^7
For detail description, please refer to
F.C. Chang, "Solving multple-root polynomials" IEEE Antennas and Propagation Magazine, Vol.51, No.6, pp. 151-155, Dec. 2009.
Or get a pdf file by e-mail from fcchang007@yahoo.com.
|