EOF的源程序 MATLAB(15页).doc
《EOF的源程序 MATLAB(15页).doc》由会员分享,可在线阅读,更多相关《EOF的源程序 MATLAB(15页).doc(15页珍藏版)》请在淘文阁 - 分享文档赚钱的网站上搜索。
1、- EEOF.M function E,V,A,C=eeof(X, M, convert) % Syntax: E,V,A,C=eeof(X, M); E,V,A,C=eeof(X, M, 1); % This function performs an extended empirical orthogonal % function (EEOF) analysis of matrix X, for embedding dimension M. % Each of the L columns of X is a time series of length N. % % Returns: E -
2、eigenfunction matrix. (LM by LM) % V - vector containing variances (unnormalized eigenvalues). % A - matrix of principal components. % C - lag-covariance matrix. % % V is ordered from large to small: E and A are sorted accordingly. % % Note that X is assumed to be centered. To center the data, use %
3、 the commands: % r,c=size(X); X=X-ones(r,1)*mean(X); before running EEOF. % If you also want to standardize the data, use: % X=X./(ones(r,1)*std(X);. % % If a third argument is supplied, the eigenfunctions/values will % be reordered into the same format as MSSA output - i. e. L blocks % of size M ra
4、ther than M blocks of size L. % % This function provides the same output, within numerically determined % limits, as MSSA methods using Broomhead-King type covariance estimation: % it is intended as a check on those functions. % % Note that this function is *extremely* computationally intensive % fo
5、r large matrices and lags. For example, if X is 1000 by 1000, % and M = 5, EEOF will take about 10 hours on a Cray YMP! Inputting % a subset of the PCs of X rather than the full data matrix can % substantially reduce the computational load. % % Written by Eric Breitenberger. Version date 1/11/96 % P
6、lease send comments and suggestions to ericgi.alaska.edu % N,L=size(X); if M*L=N-M+1, disp(Warning: Covariance matrix may be ill-conditioned.), end % Create the extended matrix: T=zeros(N-M+1,M*L); for i=1:M T(:,L*(i-1)+1:L*i)=X(i:N-M+i,:); end % Compute the eigenvectors/values of the covariance mat
7、rix: C=(T*T)/(N-M+1); clear X E,V=eig(C); V=diag(V); A=T*E; % compute principal components if nargin=3 % Prepare MSSA-style output: % sort E,V,C, and A from M blocks of L to L blocks of M. ind=1:L:(M-1)*L+1; for i=1:L, index=index ind+i-1; end E=E(index,index); V=V(index); % sort the covariance matr
8、ix and PCs: C=C(index,index); A=A(:,index); end % Sort eigenvalues/vectors/PCs in descending order: V,ind=sort(-V); V=-V; E=E(:,ind); A=A(:,ind); EOF.Mfunction F,L,B=eof(X,n,s); % EOF calculates the empirical orthogonal functions % and amplitudes (principal components) of the data matrix X. % Syntax
9、: F,L,B=eof(X); F,L,B=eof(X,.9,norm); % % Input: X - data matrix. For a standard (S-mode) EOF analysis, % the columns of X are time series, while the rows % are spatial maps. The eigenfunctions in this case % will be spatial patterns, and the principal % components are time series. % n - number of e
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- EOF的源程序 MATLAB15页 EOF 源程序 MATLAB 15
限制150内