clear all;
clc;
load di1nr;
load di1ns;
load di1pr;
load di1ps;
load dif;
load dila;
load disa;
load dv1n;
load dv1p;
load dv1pn;
load dv2n;
load dv2p;
load dv2pn;
load dvla;
load dvsa;
load i1nr;
load i1ns;
load i1pr;
load i1ps;
load ifault;
load ila;
load isa;
load v1n;
load v1p;
load v1pn;
load v2n;
load v2p;
load v2pn;
load vla;
load vsa;
%di1nr%
[c,l]=wavedec(di1nr,5,'db4');
[di1nrcd1,di1nrcd2,di1nrcd3,di1nrcd4,di1nrcd5]=detcoef(c,l,[1 2 3 4 5]);
di1nrca5=appcoef(c,l,'db4',5);
di1nrca4=appcoef(c,l,'db4',4);
di1nrca3=appcoef(c,l,'db4',3);
di1nrca2=appcoef(c,l,'db4',2);
di1nrca1=appcoef(c,l,'db4',1);
figure(1)
subplot(6,2,1); plot(di1nr)
title('di1nr');
subplot(6,2,3); plot(di1nrcd1)
title('di1nrcd1');
subplot(6,2,4); plot(di1nrca1)
title('di1nrca1');
subplot(6,2,5); plot(di1nrcd2)
title('di1nrcd2');
subplot(6,2,6); plot(di1nrca2)
title('di1nrca2');
subplot(6,2,7); plot(di1nrcd3)
title('di1nrcd3');
subplot(6,2,8); plot(di1nrca3)
title('di1nrca3');
subplot(6,2,9); plot(di1nrcd4)
title('di1nrcd4');
subplot(6,2,10); plot(di1nrca4)
title('di1nrca4');
subplot(6,2,11); plot(di1nrcd5)
title('di1nrcd5');
subplot(6,2,12); plot(di1nrca5)
title('di1nrca5');
%di1ns%
[c,l]=wavedec(di1ns,5,'db4');
[di1nscd1,di1nscd2,di1nscd3,di1nscd4,di1nscd5]=detcoef(c,l,[1 2 3 4 5]);
di1nsca5=appcoef(c,l,'db4',5);
di1nsca4=appcoef(c,l,'db4',4);
di1nsca3=appcoef(c,l,'db4',3);
di1nsca2=appcoef(c,l,'db4',2);
di1nsca1=appcoef(c,l,'db4',1);
figure(2)
subplot(6,2,1); plot(di1ns)
title('di1ns');
subplot(6,2,3); plot(di1nscd1)
title('di1nscd1');
subplot(6,2,4); plot(di1nsca1)
title('di1nsca1');
subplot(6,2,5); plot(di1nscd2)
title('di1nscd2');
subplot(6,2,6); plot(di1nsca2)
title('di1nsca2');
subplot(6,2,7); plot(di1nscd3)
title('di1nscd3');
subplot(6,2,8); plot(di1nsca3)
title('di1nsca3');
subplot(6,2,9); plot(di1nscd4)
title('di1nscd4');
subplot(6,2,10); plot(di1nsca4)
title('di1nsca4');
subplot(6,2,11); plot(di1nscd5)
title('di1nscd5');
subplot(6,2,12); plot(di1nsca5)
title('di1nsca5');
%di1pr%
[c,l]=wavedec(di1pr,5,'db4');
[di1prcd1,di1prcd2,di1prcd3,di1prcd4,di1prcd5]=detcoef(c,l,[1 2 3 4 5]);
di1prca5=appcoef(c,l,'db4',5);
di1prca4=appcoef(c,l,'db4',4);
di1prca3=appcoef(c,l,'db4',3);
di1prca2=appcoef(c,l,'db4',2);
di1prca1=appcoef(c,l,'db4',1);
figure(3)
subplot(6,2,1); plot(di1pr)
title('di1pr');
subplot(6,2,3); plot(di1prcd1)
title('di1prcd1');
subplot(6,2,4); plot(di1prca1)
title('di1prca1');
subplot(6,2,5); plot(di1prcd2)
title('di1prcd2');
subplot(6,2,6); plot(di1prca2)
title('di1prca2');
subplot(6,2,7); plot(di1prcd3)
title('di1prcd3');
subplot(6,2,8); plot(di1prca3)
title('di1prca3');
subplot(6,2,9); plot(di1prcd4)
title('di1prcd4');
subplot(6,2,10); plot(di1prca4)
title('di1prca4');
subplot(6,2,11); plot(di1prcd5)
title('di1prcd5');
subplot(6,2,12); plot(di1prca5)
title('di1prca5');
%di1ps%
[c,l]=wavedec(di1ps,5,'db4');
[di1pscd1,di1pscd2,di1pscd3,di1pscd4,di1pscd5]=detcoef(c,l,[1 2 3 4 5]);
di1psca5=appcoef(c,l,'db4',5);
di1psca4=appcoef(c,l,'db4',4);
di1psca3=appcoef(c,l,'db4',3);
di1psca2=appcoef(c,l,'db4',2);
di1psca1=appcoef(c,l,'db4',1);
figure(4)
subplot(6,2,1); plot(di1ps)
title('di1ps');
subplot(6,2,3); plot(di1pscd1)
title('di1pscd1');
subplot(6,2,4); plot(di1psca1)
title('di1psca1');
subplot(6,2,5); plot(di1pscd2)
title('di1pscd2');
subplot(6,2,6); plot(di1psca2)
title('di1psca2');
subplot(6,2,7); plot(di1pscd3)
title('di1pscd3');
subplot(6,2,8); plot(di1psca3)
title('di1psca3');
subplot(6,2,9); plot(di1pscd4)
title('di1pscd4');
subplot(6,2,10); plot(di1psca4)
title('di1psca4');
subplot(6,2,11); plot(di1pscd5)
title('di1pscd5');
subplot(6,2,12); plot(di1psca5)
title('di1psca5');
%dif%
[c,l]=wavedec(dif,5,'db4');
[difcd1,difcd2,difcd3,difcd4,difcd5]=detcoef(c,l,[1 2 3 4 5]);
difca5=appcoef(c,l,'db4',5);
difca4=appcoef(c,l,'db4',4);
difca3=appcoef(c,l,'db4',3);
difca2=appcoef(c,l,'db4',2);
difca1=appcoef(c,l,'db4',1);
figure(5)
subplot(6,2,1); plot(dif)
title('dif');
subplot(6,2,3); plot(difcd1)
title('difcd1');
subplot(6,2,4); plot(difca1)
title('difca1');
subplot(6,2,5); plot(difcd2)
title('difcd2');
subplot(6,2,6); plot(difca2)
title('difca2');
subplot(6,2,7); plot(difcd3)
title('difcd3');
subplot(6,2,8); plot(difca3)
title('difca3');
subplot(6,2,9); plot(difcd4)
title('difcd4');
subplot(6,2,10); plot(difca4)
title('difca4');
subplot(6,2,11); plot(difcd5)
title('difcd5');
subplot(6,2,12); plot(difca5)
title('difca5');
%dila%
[c,l]=wavedec(dila,5,'db4');
[dilacd1,dilacd2,dilacd3,dilacd4,dilacd5]=detcoef(c,l,[1 2 3 4 5]);
dilaca5=appcoef(c,l,'db4',5);
dilaca4=appcoef(c,l,'db4',4);
dilaca3=appcoef(c,l,'db4',3);
dilaca2=appcoef(c,l,'db4',2);
dilaca1=appcoef(c,l,'db4',1);
figure(6)
subplot(6,2,1); plot(dila)
title('dila');
subplot(6,2,3); plot(dilacd1)
title('dilacd1');
subplot(6,2,4); plot(dilaca1)
title('dilaca1');
subplot(6,2,5); plot(dilacd2)
title('dilacd2');
subplot(6,2,6); plot(dilaca2)
title('dilaca2');
subplot(6,2,7); plot(dilacd3)
title('dilacd3');
subplot(6,2,8); plot(dilaca3)
title('dilaca3');
subplot(6,2,9); plot(dilacd4)
title('dilacd4');
subplot(6,2,10); plot(dilaca4)
title('dilaca4');
subplot(6,2,11); plot(dilacd5)
title('dilacd5');
subplot(6,2,12); plot(dilaca5)
title('dilaca5');
%disa%
[c,l]=wavedec(disa,5,'db4');
[disacd1,disacd2,disacd3,disacd4,disacd5]=detcoef(c,l,[1 2 3 4 5]);
disaca5=appcoef(c,l,'db4',5);
disaca4=appcoef(c,l,'db4',4);
disaca3=appcoef(c,l,'db4',3);
disaca2=appcoef(c,l,'db4',2);
disaca1=appcoef(c,l,'db4',1);
figure(7)
subplot(6,2,1); plot(disa)
title('disa');
subplot(6,2,3); plot(disacd1)
title('disacd1');
subplot(6,2,4); plot(disaca1)
title('disaca1');
subplot(6,2,5); plot(disacd2)
title('disacd2');
subplot(6,2,6); plot(disaca2)
title('disaca2');
subplot(6,2,7); plot(disacd3)
title('disacd3');
subplot(6,2,8); plot(disaca3)
title('disaca3');
subplot(6,2,9); plot(disacd4)
title('disacd4');
subplot(6,2,10); plot(disaca4)
title('disaca4');
subplot(6,2,11); plot(disacd5)
title('disacd5');
subplot(6,2,12); plot(disaca5)
title('disaca5');
%dv1n%
[c,l]=wavedec(dv1n,5,'db4');
[dv1ncd1,dv1ncd2,dv1ncd3,dv1ncd4,dv1ncd5]=detcoef(c,l,[1 2 3 4 5]);
dv1nca5=appcoef(c,l,'db4',5);
dv1nca4=appcoef(c,l,'db4',4);
dv1nca3=appcoef(c,l,'db4',3);
dv1nca2=appcoef(c,l,'db4',2);
dv1nca1=appcoef(c,l,'db4',1);
figure(8)
subplot(6,2,1); plot(dv1n)
title('dv1n');
subplot(6,2,3); plot(dv1ncd1)
title('dv1ncd1');
subplot(6,2,4); plot(dv1nca1)
title('dv1nca1');
subplot(6,2,5); plot(dv1ncd2)
title('dv1ncd2');
subplot(6,2,6); plot(dv1nca2)
title('dv1nca2');
subplot(6,2,7); plot(dv1ncd3)
title('dv1ncd3');
subplot(6,2,8); plot(dv1nca3)
title('dv1nca3');
subplot(6,2,9); plot(dv1ncd4)
title('dv1ncd4');
subplot(6,2,10); plot(dv1nca4)
title('dv1nca4');
subplot(6,2,11); plot(dv1ncd5)
title('dv1ncd5');
subplot(6,2,12); plot(dv1nca5)
title('dv1nca5');
%dv1p%
[c,l]=wavedec(dv1p,5,'db4');
[dv1pcd1,dv1pcd2,dv1pcd3,dv1pcd4,dv1pcd5]=detcoef(c,l,[1 2 3 4 5]);
dv1pca5=appcoef(c,l,'db4',5);
dv1pca4=appcoef(c,l,'db4',4);
dv1pca3=appcoef(c,l,'db4',3);
dv1pca2=appcoef(c,l,'db4',2);
dv1pca1=appcoef(c,l,'db4',1);
figure(9)
subplot(6,2,1); plot(dv1p)
title('dv1p');
subplot(6,2,3); plot(dv1pcd1)
title('dv1pcd1');
subplot(6,2,4); plot(dv1pca1)
title('dv1pca1');
subplot(6,2,5); plot(dv1pcd2)
title('dv1pcd2');
subplot(6,2,6); plot(dv1pca2)
title('dv1pca2');
subplot(6,2,7); plot(dv1pcd3)
title('dv1pcd3');
subplot(6,2,8); plot(dv1pca3)
title('dv1pca3');
subplot(6,2,9); plot(dv1pcd4)
title('dv1pcd4');
subplot(6,2,10); plot(dv1pca4)
title('dv1pca4');
subplot(6,2,11); plot(dv1pcd5)
title('dv1pcd5');
subplot(6,2,12); plot(dv1pca5)
title('dv1pca5');
%dv1pn%
[c,l]=wavedec(dv1pn,5,'db4');
[dv1pncd1,dv1pncd2,dv1pncd3,dv1pncd4,dv1pncd5]=detcoef(c,l,[1 2