📄 eofcorr.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 + -