How to solve eigs/checkInputs issue in EOF analysis?

조회 수: 6 (최근 30일)
Subhodh Sharma
Subhodh Sharma 2021년 8월 21일
답변: Christine Tobler 2021년 8월 23일
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)
checkInputs(varargin{:});
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
below.
'''
The above error is coming. I am stuck on this issue, I would really appreciate your help.
  댓글 수: 1
Steven Lord
Steven Lord 2021년 8월 21일
What are the sizes of R and N_eofs on that line?
If N_eofs is a scalar (1-by-1) what is its value?
Are you trying to solve the generalized eigenvalue problem (find V and D such that R*V equals N_eofs*V*D) or the regular eigenvalue problem finding only a limited number of eigenvalues (find the N_eofs largest magnitude eigenvalues such that R*V equals V*D)?

댓글을 달려면 로그인하십시오.

답변 (1개)

Christine Tobler
Christine Tobler 2021년 8월 23일
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.

카테고리

Help CenterFile Exchange에서 Climate Science and Analysis에 대해 자세히 알아보기

제품


릴리스

R2016b

Community Treasure Hunt

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

Start Hunting!

Translated by