3f62d540 |
1 | %clear all |
2 | load donneesSelec.mat |
3 | %donnees=[ind100,res100]; |
4 | donnees = BB; |
5 | Res=mean(donnees,2); |
6 | for i=1:349 |
7 | X2(:,i)=Res(48*(i-1)+1:48*i); |
8 | end |
9 | for i=1:348 |
10 | signal(:,i)=[X2(:,i);X2(:,i+1)]; |
11 | end |
12 | |
13 | [p1,n1]=size(X2); |
14 | for i=1:n1 |
15 | for j=1:p1 |
16 | XC(i,j)=X2(j,i)-mean(X2(:,i)); |
17 | end |
18 | |
19 | [C,L]=wavedec(XC(i,:)',4,'haar'); |
20 | xProj(i,:)=C(1:12); |
21 | end |
22 | |
23 | X=xProj(1:end-2,:); |
24 | Y=xProj(2:end-1,:); |
25 | for i=1:n1 |
26 | Xrecon(i,:)=waverec([xProj(i,:),zeros(1,36)],L,'haar'); |
27 | end |
28 | for i=1:348 |
29 | signal3(:,i)=[Xrecon(i,:),Xrecon(i+1,:)]; |
30 | end |