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

📄 mpc.m

📁 多通道奇异谱分析程序
💻 M
字号:
  function [A]=mpc(X,E)
%        Syntax: [A]=mpc(X,E);
% This function calculates the MSSA principal components of the data
% matrix X from the eigenfunction matrix E (from MSSAEIG).
% The eigenvector matrix may be of reduced size (k columns) - one
% PC will be calculated for each supplied eigenvector.
%
% Output: A - principal components matrix (N-M+1 x k)
%
% See section 2.4 of Vautard, Yiou, and Ghil, 1992, Physica D 58, 95-126;
% and Plaut and Vautard, 1994, J. Atm. Sciences 51, 210-236.
%
% Written by Eric Breitenberger.    Version date 1/11/96
% Please send comments and suggestions to eric@gi.alaska.edu   

[N,L]=size(X);
[M,k]=size(E);                
M=M/L; % Calculate the *actual* value for M
if k>L*M, error('Improper specification of k.'), end
A=zeros(N,k);
a=zeros(N,L);
Ej=zeros(M,L);

for K=1:k
  Ej(:)=E(:,K);
  Ej=flipud(Ej);
  for j=1:L
    a(:,j)=filter(Ej(:,j),1,X(:,j));
  end
  if L>1
    A(:,K)=sum(a')';
  else
    A(:,K)=a;
  end
end

A=A(M:N,:);

⌨️ 快捷键说明

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