How to solve eigs/checkInputs issue in EOF analysis?
3 views (last 30 days)
I am trying to do the EOF analysis using the the function of climate data toolbox. My data has the same form as the provided "sst example". However, I can't seem to solve it. My data has dimensions (20 * 20 * 60). First, two is spatial info and the last one is time. I am trying to find the EOF first mode using this command "output=eof(data,1)".
In the website they same way calcualte the first mode as follows ":output=eof(sst,1)", where sst has dimension (60*50*802).
Error using eigs/checkInputs (line 541)A number of eigenvalues requested, k, must be a positive integer not greater than n = 0. Instead, it was 1.
Error in eigs (line 97)
Error in eof>mycaleof (line 145)
[V,D] = eigs(R,N_eofs); % matrix of eigenvectors V and diagonal matrix of eigenvalues D
Error in eof (line 85)
[E,pc,expvar] = mycaleof(A,n); % An edited version of Guillame MAZE's caleof function, which appears as a subfunction
The above error is coming. I am stuck on this issue, I would really appreciate your help.
Christine Tobler on 23 Aug 2021
The error here is happening because R eof>mycaleof is an empty matrix, and eof is trying to compute an eigenvalue of it. Looking at the eof file exchange package, it seems that this would happen either if input A is empty, or if A contains too many NaN values.