Eigs yields different results on different versions

6 visualizzazioni (ultimi 30 giorni)
I've written a program that uses eigs to find the modeshapes of a plate coupled with acoustics.
I use two computers which run 2018a and 2016b respectively. But when I run the exact same code I get diffrent modeshapes for the plate, even though the eigenvalues are almost the same. (I have also tried this on two other computers, with the same version difference)
The 2016b version yields the expected results:
Whereas the 2018a version yields som rather weird results:
The plots have been made using Paraview
I use the eigs function like this:
[opt.D,lam] = eigs(opt.K,opt.M, 4, 2*pi);
Where opt.K and opt.M are sparse matrices
What can cause this? And how can I get the 2016b results on my 2018a?

Risposte (2)

Walter Roberson
Walter Roberson il 6 Apr 2018
It is expected that there can be changes between releases and between platforms and between processors, as different versions of LAPACK or MKL can get used.
There was a change in libraries on MS Windows between R2015b and R2016a; https://www.mathworks.com/matlabcentral/answers/319225-hac-results-vary-bewteen-matlab-r2015b-and-matlab-r2016b that especially affected matrices that were on the boundary of being singular. The older versions were more tolerant and the newer versions were more likely to complain.
I am not aware of a particular update after R2016a but it is fairly likely that one occurred; I think I saw somewhere that they updated LAPACK versions along the way.
I would not expect to see a difference as large as you are seeing, though -- not unless your system had a high condition number.
It might be worth experimenting with syms() the numeric matrix and processing that, so that you can potentially get a higher precision output.

Christine Tobler
Christine Tobler il 6 Apr 2018
Numerical results can change between versions, and for eigenvectors, it's possible that several eigenvectors have the same or very similar eigenvalues. In that case, small changes can lead to a big difference in which eigenvectors are returned, and how they are scaled.
Also, in R2017b, the algorithm used in EIGS was rewritten, which could explain the difference.
Could you tell me the eigenvalues computed by EIGS in the two versions ( opt.D )? Also, the norm of the residuals could be useful to diagnose the problem ( norm(opt.K*lam - opt.M*lam*opt.D) ).

Categorie

Scopri di più su Audio Processing Algorithm Design in Help Center e File Exchange

Prodotti

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by