Commit | Line | Data |
---|---|---|
3453829e BA |
1 | %Dessins prétraitements |
2 | script | |
3 | ||
4 | XC=X2(:,1)-mean(X2(:,1)); | |
5 | ||
6 | [C1,L1] = wavedec(X2(:,1),4,'haar'); | |
7 | xProj1=C(4:12); | |
8 | ||
9 | [C2,L2]=wavedec(XC',4,'haar'); | |
10 | xProj2=C(1:12); | |
11 | ||
12 | Xrecon1 = waverec([zeros(1,3),xProj1',zeros(1,36)],L1,'haar'); | |
13 | Xrecon2 = waverec([xProj2',zeros(1,36)],L2,'haar'); | |
14 | ||
15 | plot(X2(:,1),'LineWidth',2) | |
16 | hold on | |
17 | plot(Xrecon1,'r-o','LineWidth',2) | |
18 | plot(Xrecon2,'g-s','LineWidth',2) | |
19 | xlabel('Instant of the day','FontSize', 30) | |
20 | ylabel(['Load consumption and its reconstructions' sprintf('\n') ' after projecting and preprocessing'],'FontSize', 30) | |
21 | set(gca, 'FontSize', 20, 'fontName','Times'); | |
22 | legend('Original signal','Reconstruction after projection and preprocessing 1','Reconstruction after projection and preprocessing 2','Location','NorthWest') |