recovering of time series in SSA

39 Views Asked by At

i am trying to reconstruct time series from SSA ,because according to this link

http://en.wikipedia.org/wiki/Singular_spectrum_analysis

there is procedure

4th step: Diagonal averaging.

i have with started following code

clear all;
  B=xlsread('data_generations1','A1','g8:g301');
  n=length(B);
  l =input('Give the size of the interval: ' );% Number of columns in the Data matrix
   m=n-l+1;%number of rows in the Data matrix
 X = zeros(m,l);
  for i=1:m
        X(i,:)=B(i:i+l-1);
  end;
  [U E V]=svd(X);

now which procedure should i make?i should choose some eigenvalues right?from example let us consider following code

>> E=E(:);
    >> stem(E);

enter image description here

in this case i should choose first four eigenvalue right?what i would like would be if i will indicate starting index of eigenvalue and ending point of eigenvalue and i will reconstruct time series in these range,how can i do it?please help me