필터 지우기
필터 지우기

How to use the syntax of Multilevel 1-D wavelet decomposition in for loop ??

조회 수: 1 (최근 30일)
afef
afef 2017년 7월 21일
I have to use the syntax of Multilevel 1-D wavelet decomposition which is
[c,l]=wavedec(x,4,'db4');
[cd1,cd2,cd3,cd4]=detcoef(c,l,[1,2,3,4]);
cA4=appcoef(c,l,'db4',4);
for my multichannel EEG signal which contains 23 derivations so i used a for loop to have simple and short code i tried this :
Fs=256;
result=cell(23,1);
d1=designfilt('lowpassfir','PassbandFrequency',0.45,'StopbandFrequency',0.5,'PassbandRipple',3,'StopbandAttenuation',60,'DesignMethod','equiripple');
for n=1:23
deriv=(val(n,:))/2.559375;
t=(0:length(deriv)-1)/Fs;
result{n} = filtfilt(d1,deriv);
moyenne{n}=mean(result{n},2);
variance{n} = std(result{n},[], 2);
Maximale{n}= max(result{n},[],2);
Minimale{n} = min(result{n},[],2);
[c,l]=wavedec(result{n},4,'db4');
[cd1,cd2,cd3,cd4]=detcoef(c,l,[1,2,3,4]);
cA4=appcoef(c,l,'db4',4);
[Ea,Ed]=wenergy(c,l)
energie{n} = {Ea, Ed};
end
[a,b,z,d,e,f,g,h,i,j,k,ll,m,n,o,p,q,r,s,x,u,v,w]=result{:};
But concerning [c,l] , [cd1,cd2,cd3,cd4] and cA4 i only get the result for one derivation How to correct the code to get the results for all the derivations ?

답변 (0개)

카테고리

Help CenterFile Exchange에서 Wavelet Toolbox에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by