reconstruct DWT with detail 2 to detail 5 for 1-D signal

조회 수: 4 (최근 30일)
claire
claire 2011년 10월 24일
I'm using db8 DWT for my 1-D signal How can I keep details between detail(2) to detail(5) and remove the others and reconstruct the signal with those keeped?

채택된 답변

Wayne King
Wayne King 2011년 10월 24일
[C,L] = wavedec(x,8,'db8');
Cnew = zeros(size(C));
indices = cumsum(L);
Cnew(1:L(1)) = C(1:L(1));
Cnew(indices(4)+1:indices(9)) = C(indices(4)+1:indices(9));
xnew = waverec(Cnew,L,'db8');

추가 답변 (1개)

Wayne King
Wayne King 2011년 10월 24일
Hi I'm assuming you want to keep the level 5 scaling (approximation) coefficients.
Let x be your signal. You can zero out the finest scale details and reconstruct your approximation with the following code.
[C,L] = wavedec(x,5,'db8');
C(L(end-1)+1:end) = 0;
xnew = waverec(C,L,'db8');
Are you sure what to just zero out all the finest details? Consider using wden, or at least wthresh on the finest scale details.
  댓글 수: 3
Wayne King
Wayne King 2011년 10월 24일
If you are only keeping details 2 to 5, why do you decompose your signal down to level 8? what is the point of that?
claire
claire 2011년 10월 24일
I need to keep later details from level 5 to level 8 to extract others features that I need from my signal because small pics in the signal are better detected in high levels

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Signal Analysis에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by