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