![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/175001/image.png)
Hi, i need to find out the eigenvalues of a 8000x8000 matrix system by eig() function of matlab?? may i know the normal simulation time of the eig() function of such a huge matrix in MATLAB?
5 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Hi, i need to find out the eigenvalues of a 8000x8000 matrix system by eig() function of matlab?? may i know the normal simulation time of the eig() function of such a huge matrix in MATLAB?
0 Kommentare
Antworten (2)
George
am 6 Sep. 2016
It's going to depend on the matrix, correct?
Running a simulation on my machine (Surface Pro3) I was able to modify the example from the eig() documentation to use a 8000x8000 matrix. It calculated the eigenvalues in ~44sec.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/175001/image.png)
0 Kommentare
John D'Errico
am 6 Sep. 2016
Bearbeitet: John D'Errico
am 6 Sep. 2016
The normal time is 42. I'm not sure what the units are though. :)
How can we tell you the "normal time" to compute eigenvalues? It will depend on what computer you have. It will depend on the speed of that computer. It will depend on how much RAM you have. It will depend on the matrix. (If your matrix is diagonal, this will go pretty fast.)
If you really want to know the "normal" time for your computer, then time eig for a series of smaller nxn matrices, and extrapolate the time up to n=8000.
t = NaN(1,1800);
N = 100:100:1800;
for n = N
A = randn(n);
t(n) = timeit(@() eig(A));
end
loglog(N,t(N),'o')
grid on
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/175002/image.jpeg)
p = polyfit(log(N),log(t(N)),1)
p =
2.1406 -14.748
exp(polyval(p,log(8000)))
ans =
89.16
So, on MY computer, I'd expect it to take roughly 1.5 minutes, unless it starts to have memory problems.
0 Kommentare
Siehe auch
Kategorien
Mehr zu Linear Algebra finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!