This function returns the smallest positive real root of a fourth order polynomial (quartic) using Descartes' solution. For solving the the resolvent cubic I used a method from "Numerical Recipes in C: The art of scientific computing", page 184-185.
After some testing it on my own computer is seems that this function is between 5.5 to 6 times faster than using the MATLAB function roots, which also returns its complex roots.
Kwin (2021). Smallest positive real root of a quartic equation (https://www.mathworks.com/matlabcentral/fileexchange/59484-smallest-positive-real-root-of-a-quartic-equation), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform CompatibilityWindows macOS Linux
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!