資源簡介
該算法屬于SSA奇異譜分析,里面詳細介紹了奇異譜分析的代碼流程,并附有中文注釋,中文注釋對SSA奇異譜分析的原理給予了一定闡述,對讀懂代碼大有益處。
代碼片段和文件信息
function?[yrvr]=ssa(x1L)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%?SSA?generates?a?trayectory?matrix?X?from?the?original?series?x1(通過平滑一個長度為L的窗口,SSA生成了原始時間序列的軌跡方程X)
%?by?sliding?a?window?of?length?L.?The?trayectory?matrix?is?aproximated?(軌跡方程是通過奇異值分解估計的)
%?using?Singular?Value?Decomposition.?The?last?step?reconstructs(最后一步通過估計的軌跡矩陣重構時間序列)
%?the?series?from?the?aproximated?trayectory?matrix.?
%The?SSA?applications?include?smoothing?filtering?and?trend?extraction.(SSA應用包括平滑,濾波和趨勢項提取)
%SSA的應用包括平滑、過濾以及趨勢分析
%?x1?Original?time?series?(column?vector?form)?原始時間序列
%?L??Window?length?????????????????????????????窗口長度
%?y??Reconstructed?time?series?????????????????重構時間序列
%?r??Residual?time?series?r=x1-y???????????????殘余時間序列
%?vr?Relative?value?of?the?norm?of?the?approximated?trajectory?matrix?with?respect
% ??to?the?original?trajectory?matrix
%?The?program?output?is?the?Singular?Spectrum?of?x1?(must?be?a?column
%?vector)必須是列向量
%?using?a?window?length?L.?You?must?choose?the?components?be?used?to?reconstruct?
%the?series?in?the?form?[i1i2:ik...iL]?based?on?the?Singular?Spectrum?appearance.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%?Step1?:?Build?trayectory?matri
- 上一篇:MATLAB 分水嶺算法
- 下一篇:基于matlab的判別分析代碼
評論
共有 條評論