|
From: | Quentin Spencer |
Subject: | Re: roots(poly(r)) != r |
Date: | Fri, 02 Mar 2007 16:54:09 -0600 |
User-agent: | Thunderbird 1.5.0.9 (X11/20070212) |
Torben Mikael Hansen wrote:
I have been playing around with poly and roots, don't understands this a=rand(100,1); r=exp(I*.1*pi*2*[a;-a]); e=max(sort(abs(roots(poly(r))))-sort(abs(r))); Shouldn't this give an "e" that close to zero. I always get something in the order of 10.
Not really. Computing the roots of a polynomial is known to be sensitive to roundoff errors. This is easily demonstrated by looking at the output of "roots(poly(1:20))". The errors only get worse as the order of the polynomial increases.
Quentin
[Prev in Thread] | Current Thread | [Next in Thread] |