%ACP -> ne pas regarder
close all
clear all
load ../tb_50.dat
x=[];ts=3;te=52;
npca  =  15;    % number of PCA
for t=ts:te,
    I1=find(tb_50(:,1)==t);
    x(t,:)=tb_50(I1,5);
end
EOFs=calc_acp(x,npca);
moy=EOFs.moy';
for j = 1:npca
shfs(:,j)=EOFs.V(:,j);
end
v=sqrt(EOFs.L(1:npca));
stdU(1:npca)=v';
save('-ascii','stdevEOF_N00_tb.dat','stdU');
save('-ascii',['shfs' int2str(npca) '_N00_tb.dat'],'shfs');
save('-ascii',['mean_N00_tb.dat'],'moy');
%  return
plotPCAEnergy(EOFs.inertie,npca);


    