function simpleRoots for finding a roots of polynome

Function simpleRoots() effectively finds a roots of polynome in form [a a a ... a] or [a 0 0 ... 0 0 b] also for very large polynome.
1 Download
Updated 22 Aug 2023

View License

Function simpleRoots() finds a roots of polynomial input. Function works very effective for polynomes in form [a 0 0 0 0 0 ... 0 0 0 b] or [a a a a .... a a a a], also for very large polynomes ( approx 30 000 coefficients ).
For polynome with 3000 or more coefficients, it is more than 500-times faster than standard roots() function (for specific form of polynomes).
Function also solves a 2 specific situations:
  • removing irrelevant starting zeros in polynome (simpleRoots([0 a b c]) -> simpleRoots([a b c]))
  • solving a roots, which are located in zero point (simpleRoots([a b c 0 0]) -> [0.0; 0.0; SimpleRoots([a b c]) ] )
For polynomes, which are not in specific form, this function calls standard roots() function.
Example script (which demonstrate a speed-up in compare with roots() function ) is also attached (scriptRoots.m).

Cite As

Peter Krammer (2024). function simpleRoots for finding a roots of polynome (https://www.mathworks.com/matlabcentral/fileexchange/134177-function-simpleroots-for-finding-a-roots-of-polynome), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2023a
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

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

Start Hunting!
Version Published Release Notes
0.9.1