cuk
Newbie level 1
- Joined
- Dec 5, 2013
- Messages
- 1
- Helped
- 0
- Reputation
- 0
- Reaction score
- 0
- Trophy points
- 1
- Activity points
- 12
here i write a program, i want correlation of adjacent scales, so how can i do , can some one help me to solve this problem.
fid3=fopen('swell_130%.txt','r');
interuption=fscanf(fid3,'%10f');
fclose(fid3);
l_s = length(interuption);
%%
[cA1,cD1] = dwt(interuption,'db6');
A1 = upcoef('a',cA1,'db6',1,l_s);
D1 = upcoef('d',cD1,'db6',1,l_s);
subplot(9,1,1); plot(A1); title('Approximation A1')
subplot(9,1,2); plot(D1); title('Detail D1')
%%
[C,L] = wavedec(interuption,6,'db6');
A3 = wrcoef('a',C,L,'db6',4);
D1 = wrcoef('d',C,L,'db6',1);
D2 = wrcoef('d',C,L,'db6',2);
D3 = wrcoef('d',C,L,'db6',3);
D4 = wrcoef('d',C,L,'db6',4);
D5 = wrcoef('d',C,L,'db6',5);
D6 = wrcoef('d',C,L,'db6',6);
subplot(9,1,3); plot(A3);
title('Approximation A3')
subplot(9,1,4); plot(D1);
title('Detail D1')
subplot(9,1,5); plot(D2);
title('Detail D2')
subplot(9,1,6); plot(D3);
title('Detail D3')
subplot(9,1,7); plot(D4);
title('Detail D4')
subplot(9,1,8); plot(D5);
title('Detail D5')
subplot(9,1,9); plot(D6);
title('Detail D6')
%%correlation ????
fid3=fopen('swell_130%.txt','r');
interuption=fscanf(fid3,'%10f');
fclose(fid3);
l_s = length(interuption);
%%
[cA1,cD1] = dwt(interuption,'db6');
A1 = upcoef('a',cA1,'db6',1,l_s);
D1 = upcoef('d',cD1,'db6',1,l_s);
subplot(9,1,1); plot(A1); title('Approximation A1')
subplot(9,1,2); plot(D1); title('Detail D1')
%%
[C,L] = wavedec(interuption,6,'db6');
A3 = wrcoef('a',C,L,'db6',4);
D1 = wrcoef('d',C,L,'db6',1);
D2 = wrcoef('d',C,L,'db6',2);
D3 = wrcoef('d',C,L,'db6',3);
D4 = wrcoef('d',C,L,'db6',4);
D5 = wrcoef('d',C,L,'db6',5);
D6 = wrcoef('d',C,L,'db6',6);
subplot(9,1,3); plot(A3);
title('Approximation A3')
subplot(9,1,4); plot(D1);
title('Detail D1')
subplot(9,1,5); plot(D2);
title('Detail D2')
subplot(9,1,6); plot(D3);
title('Detail D3')
subplot(9,1,7); plot(D4);
title('Detail D4')
subplot(9,1,8); plot(D5);
title('Detail D5')
subplot(9,1,9); plot(D6);
title('Detail D6')
%%correlation ????