%% Sunspot data load sunspot.dat npts=288; t=sunspot(:,1); x=sunspot(:,2); plot(t,x); meansun=mean(x); x=x-meansun; % Create a circulant matrix from the time series X=zeros(npts,npts); idx=1:npts; for j=2:npts idx=[idx(npts) idx(1:npts-1)]; X(:,j)=x(idx); end %% Analyze the circulant matrix [U,S,V]=svd(X); ss=diag(S)./sum(diag(S));