X-Git-Url: https://git.auder.net/?p=valse.git;a=blobdiff_plain;f=reports%2Fbazar%20Emilie%2Fpretraitement.m;fp=reports%2Fbazar%20Emilie%2Fpretraitement.m;h=b0cf534fed95b8fadb1f170091a37923d9eb0a58;hp=0000000000000000000000000000000000000000;hb=3f62d540d32b70f42b9090087f72426c18cb219e;hpb=51485a7d0aafe7c31c9651fcc2e33ebd2f8a5e82 diff --git a/reports/bazar Emilie/pretraitement.m b/reports/bazar Emilie/pretraitement.m new file mode 100644 index 0000000..b0cf534 --- /dev/null +++ b/reports/bazar Emilie/pretraitement.m @@ -0,0 +1,22 @@ +%Dessins prétraitements +script + +XC=X2(:,1)-mean(X2(:,1)); + +[C1,L1] = wavedec(X2(:,1),4,'haar'); +xProj1=C(4:12); + +[C2,L2]=wavedec(XC',4,'haar'); +xProj2=C(1:12); + +Xrecon1 = waverec([zeros(1,3),xProj1',zeros(1,36)],L1,'haar'); +Xrecon2 = waverec([xProj2',zeros(1,36)],L2,'haar'); + +plot(X2(:,1),'LineWidth',2) +hold on +plot(Xrecon1,'r-o','LineWidth',2) +plot(Xrecon2,'g-s','LineWidth',2) +xlabel('Instant of the day','FontSize', 30) +ylabel(['Load consumption and its reconstructions' sprintf('\n') ' after projecting and preprocessing'],'FontSize', 30) +set(gca, 'FontSize', 20, 'fontName','Times'); +legend('Original signal','Reconstruction after projection and preprocessing 1','Reconstruction after projection and preprocessing 2','Location','NorthWest') \ No newline at end of file