1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
|
%FORECASTING PROJET 1
%IMPORTATION DES DONNEES
if(~exist('data', 'var'))
data = xlsread('CH5.xls', 1, 'B2:T4001');
measures = xlsread('CH5.xls', 1, 'B1:T1');
t = xlsread('CH5.xls', 1, 'A2:A4001');
end
%PURGE DE LA TENDANCE
detrended = detrend(data);
% MOYENNE EN FONCTION DE LA POSITION
average = mean(data,1);
aver.detrend = mean(detrended,1);
subplot(2,1,1)
plot(measures, average);
ylabel ('average')
legend('original data')
subplot(2,1,2)
plot(measures, aver.detrend);
xlabel('position measurement')
ylabel ('average')
legend('detrended data')
%CHOIX DU DECALAGE GRACE A LA FONCTION AUTOCORRELATION - ORIGINAL DATA
%pour x = 15
a = autocorrelation(data(:,1),400);
ai =find(a(:,2) < (1/exp(1)), 1);
tta = a(ai, 1);
ta= t(tta);
%pour x = 16
b = autocorrelation(data(:,2),250);
bi =find(b(:,2) < (1/exp(1)), 1);
ttb = b(bi, 1);
tb= t(ttb);
%pour x = 17
c = autocorrelation(data(:,3),300);
ci =find(c(:,2) < (1/exp(1)), 1);
ttc = c(ci, 1);
tc= t(ttc); |
Partager