Ceci est une ancienne révision du document !
# Julia Code © Djalil ChafaÏ 2021 - GNU Public License GPL v3 # https://djalil.chafai.net/blog/2021/09/26/random-matrices-spectral-radius-from-characteristic-polynomial/ using LinearAlgebra, Plots # for eigvals(), scatter(), heatmap() function spectrum(n) M = (randn(n,n)+im*randn(n,n))/sqrt(2*n) S = eigvals(M) scatter(real(S), imag(S), aspect_ratio = :equal, legend = false) return S end # function function phaseportrait(points) r = 1000 c = max.(abs.(points)) c = c + c/2 M = zeros(r,r) for i in 1:r for j in 1:r z = (-c + 2*c*i/r) + im * (-c + 2*c*j/r) M[i,j] = angle(prod(z.*points.-1)) # reciprocal charpoly phase end end heatmap(M, aspect_ratio = :equal, legend = false, axis = false, background_color = :transparent, c = :hsv) end # function phaseportrait(spectrum(250))