www.gusucode.com > Matlab动力系统和时间序列分析工具箱 > Matlab动力系统和时间序列分析工具箱/lab432/gui/gui_ssa_analysis.m

    function gui_ssa_analysis;
% SSA_ANALYSIS provide singular spectrum analysis 
%
% last modified 11.02.05
%
% References: 
% [1] Golyandina N., Nekrutkin V., Zhigljavsky A.  Analysis of Time Series Structure:
%     SSA and Related Techniques. Boca Raton: Chapman & Hall/CRC. 2001. 305 p
% [2] N.E. Golyandina V.V.Nekrutkin, D.V. Stepanov Variants of the caterpillar-ssa 
%     method for analysis of multidimensional time series http://www.gistatgroup.com/gus/ 

global TS SSA GSD_GLOBALS

str=TS.name;
% if isa(str,'char')
%     str={str};
% end

[selection,ok] = listdlg('PromptString','Select data for SSA:',...
    'SelectionMode','single','ListString',str);

if ~ok
    return
end

prompt = {'Enter delay (in sample points):','Enter embedding dimension:'};
dlg_title = 'Input for SSA';
num_lines= 1;
def     = {'1','10'};
answer  = inputdlg(prompt,dlg_title,num_lines,def);
if isempty(answer)
    return
end
emb_dim=str2num(answer{2});
delay=str2num(answer{1});

SSA=ssa_analysis(TS.data(:,selection),delay,emb_dim); 
GSD_GLOBALS.en_dis.ssa=1;
GSD_GLOBALS.en_dis.ssa_groups=0;
gui_en_dis;