The method of Weierstrass simultaneously approximates all roots
of a polynomial of degree , assumed to be monic, i.e.:
the coefficient with the highest degree term of equals one.
Starting at some initial approximation for all the roots in
,
the method uses the following formula:

This formula is implemented in the function weierstrass, which is called as follows:

>> p = randn(1,6); % degree 5 polynomial >> p = p/p(1); % make monic >> x = randn(1,5) + i*randn(1,5); % 5 random complex numbers >> [x,res] = weierstrass(p,x,1.0e-10,30)The last command returns in

Jan Verschelde 2003-09-16