Find polynomial roots with Jenkins–Traub algorithm. The mex-function is using the CPOLY algorithm from ACM Algorithm 419 for polynomials with complex coefficients, and the RPOLY algorithm from ACM Algorithm 493 for polynomials with real coefficients. The algorithm calculates all of the zeros of a polynomial whose coefficients are the elements of a vector in order of decreasing powers. Leading zeros in the coefficients are discarded.
Ivo Houtzager (2021). Polynomial roots with Jenkins-Traub algorithm (https://www.mathworks.com/matlabcentral/fileexchange/50462-polynomial-roots-with-jenkins-traub-algorithm), MATLAB Central File Exchange. Retrieved .
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Create scripts with code, output, and formatted text in a single executable document.
Seems that "abs" is double defined when including the VS2013 math.h file. Remove the line 166 from f2c.h or wrap with /**/. This will make the error disappear.
When I try and run make_polyroots.m I get the following error:
Error using mex
rpoly.c
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\math.h(470) : error C2059: syntax error : '('
Error in make_polyroots (line 55)
eval(['mex ', COMPILE_OPTIONS, ' polyroots.c',' rpoly.c',' pow_di.c']);
Any advice?