⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 eofcorr.m

📁 蒙托卡罗模拟奇异谱分析
💻 M
字号:
function [c,C]=eofcorr(E,F);
% EOFCORR - examine correlations between two sets of eigenvectors.
% Syntax: [c,C]=eofcorr(E,F);
%
% Input:  E - a set (M by e) of e eigenvectors, each of length M.
%         F - a set (M by f) of f eigenvectors, each of length M.
%
% Output: c - a vector of length e, where the i-th element
%             contains the index of the eigenvector in F which
%             is best correlated with the i-th eigenvector in E.
%
%         C - a matrix of size e by f, where C(i,j) contains 
%             the correlation between eigenvectors E(:,i) and F(:,j).
%

[M,e]=size(E);
[N,f]=size(F);

if M~=N, error('Input arguments must have the same number of rows'), end

% Standardize:
E=E-ones(M,1)*mean(E);
F=F-ones(M,1)*mean(F);
E=E./(ones(M,1)*std(E)); 
F=F./(ones(M,1)*std(F));

C=(E'*F)./(M-1); 

[x,c]=max(abs(C'));

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -