How to solve eigs/checkInputs issue in EOF analysis?

5 ビュー (過去 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 Center および File ExchangeClimate 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