Accuracy of poly for random unitary matrices
1 次查看(过去 30 天)
显示 更早的评论
I have been trying to do some computations with the characteristic polynomials of random unitary matrices, and I have come across some unusual behavior of the poly command.
Let's say that we generate a random complex unitary matrix and compute the coefficients of it's characteristic polynomial:
n=400;
[Q,R]=qr((randn(n)+1j*randn(n))/sqrt(2));
U=Q*diag(diag(R)./abs(diag(R)));
p=poly(U);
plot(abs(p),'o');
Now, I believe that the polynomial coefficients should all be relatively close to one. However, the coefficients have magnitudes around 10^63 in some cases. This seems to be a problem for large n.
Now my question is if Matlab should compute the coefficients more accurately than it does? I would think that this problem is a relatively well conditioned one: recover the characteristic polynomial of a unitary matrix.
2 个评论
John D'Errico
2014-6-18
You should not be surprised at this. Floating point arithmetic is NOT mathematics, although there are some occasional overlaps.
回答(1 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Polynomials 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!