More Flexible Sorting and Multiplicity of Roots of a Polynomial

版本 1.0.0.0 (24.2 KB) 作者: Sundar Krishnan
More Flexible Sorting and Multiplicity of Roots of a Polynomial
1.8K 次下载
更新时间 2005/7/15

无许可证

Imagine a function that can pair the Complex Conjugate Roots of a Polynomial, and also tell us how many Roots are Real, and how many are Complex ; imagine further, that this function should also be able to give us the multiplicity of the roots ; and imagine further, that this function should be able to do all this even if not all the Complex Roots of the Polynomial are Conjugate Pairs.
Information about multiplicity of roots is important when we need to raise a Polynomial to Fractional Powers.

One (feeble) immediate answer could be that MATLAB's standard cplxpair could do (part of) the functions. But, I have observed that as the degree of a Polynomial increases, the results obtained by Matlab's roots has so much variation that the standard cplxpair will result in an error !
The standard Matlab roots () function does not return n exactly identical roots if the input Polynomial has n Repeated Roots, specially when n is above 10.

So, firstly, we need to modify the tolerances of cplxpair.
My cplxpair_Mod.m is a modified version of the Standard R14 Matlab's cplxpair.m.

So, in addition to computing the number of Real and Complex Roots, and their multiplicities, we also need this new function to be able to perform the foll additional fns :
a) optionally reverse the listing order of the roots
b) List the Pure Real Roots in the beginning, and then the Complex (Conjugate-Paired) Roots for both the NORmal and the REVerse sorting cases.

Such a function is this Programme cmplx_roots_sort_Det.m.
This function makes calls to the lighter version cmplx_roots_sort.m, to Real_Roots_Multicty.m and to cplxpair_Mod.m.
When cplxpair_Mod.m throws up an error as in the case of the presence of Non-Conjugate Complex Roots, the case is dealt with in the catch block of code by considering individual roots.

An other Programme of mine, Poly_POWER.m, uses cmplx_roots_sort_Det.m to get the multiplicity of roots.

引用格式

Sundar Krishnan (2024). More Flexible Sorting and Multiplicity of Roots of a Polynomial (https://www.mathworks.com/matlabcentral/fileexchange/8037-more-flexible-sorting-and-multiplicity-of-roots-of-a-polynomial), MATLAB Central File Exchange. 检索时间: .

MATLAB 版本兼容性
创建方式 R14
兼容任何版本
平台兼容性
Windows macOS Linux
类别
Help CenterMATLAB Answers 中查找有关 Polynomials 的更多信息

Community Treasure Hunt

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

Start Hunting!
版本 已发布 发行说明
1.0.0.0