Particular frequency band rejection in MATLAB using DWT
7 views (last 30 days)
Show older comments
My problem is as follows: I decompose the 4th level detail coefficient of an ECG signal further up to the fourth level and I want to reject the approx. coeff. at this level, which corresponds to the powerline interference. I reject this by using upcoef() with 'd' and then specifying only the detail coefficient. Then I want to keep on using idwt() to get back at the previous level , but this is not being possible because of the length mismatch of the new reconstucted detail coeffs. and the original approx. coeffs. I would like to know if at all it is possible (in MATLAB) to reject a frequency band corresponding to the further decomposition of the detail coefficient, because when you go back up, the reconstructed coefficient lengths are different because of the inherent convolution operation.
I am posting my code below:
[C1, L1]=wavedec(detrendedecg, 4, 'db8');
[cd4]=detcoef(C1,L1,[4]);
[aa1,dd1]=dwt(cd4, 'db8');
[aa2,dd2]=dwt(dd1, 'db8');
[aa3,dd3]=dwt(dd2, 'db8');
[aa4,dd4]=dwt(dd3, 'db8');
newdd3=idwt([],dd4,'db8');
newdd2=idwt([aa3],[newdd3],'db8');
newdd1=idwt([aa2],[newdd2],'db8');
newcd4=idwt([aa1],[newdd1],'db8');
the original signal is detrendedecg. It is decomposed upto level 4 to get cd4 as detail coefficient. cd4 is decomposed again up to 4 levels to obtain dd4 as the detail coefficient at level 4. I want to reject the approx coefficient at this level, i.e., aa4. But this code doesn't help. It gives a matrix dimension mismatch error on the third line from thee end. What do I do now?
matlab
0 Comments
Answers (0)
See Also
Categories
Find more on Signal Analysis in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!