필터 지우기
필터 지우기

How to calculate the energy of details and approxmiations coefficients of discret wavelet transform ?

조회 수: 5 (최근 30일)
Hi everyone, i calculate the energy of details and approxmiations coefficients of discret wavelet transform .i used DWT(Daub4) Here is the code
for n=1:23
deriv=(val(n,:))/2.559375;
t=(0:length(deriv)-1)/Fs;
result{n} = filtfilt(d1,deriv);
[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
And when i was looking for the formula of the energy i found this :
and as i understand the energy is the percentage of energy corresponding to the approximation and the details
So when i was trying to write a C code using this formula and the values of cd1,cd2,cd3,cd4 i don't get the same values that i have with matlab So i want to know where i wrong ?
i mean to calcuate the energy i should use [cd1,cd2,cd3,cd4]??
Please i need a clarification,Thanks
  댓글 수: 1
Ewunate Assaye Kassaw
Ewunate Assaye Kassaw 2020년 6월 18일
hello sir
it gives me a hint thanks for that
i have questions
  1. n stands for what?
  2. 2.559375 where this number comes from?
  3. deriv=(val(n,:))/2.559375; i dont undrstand 'val' it gives error when i run it and says fix val with eval and again gives me error
can you help me please?

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

답변 (2개)

Jiaxin Tu
Jiaxin Tu 2019년 2월 28일
That's because wenergy gives the percentage of power out of 100.
If you divide your calculations with the formula by the sum of energy *100 you will get the same answer

Ewunate Assaye Kassaw
Ewunate Assaye Kassaw 2020년 6월 18일
hello sir
it gives me a hint thanks for that
i have questions
  1. n stands for what?
  2. 2.559375 where this number comes from?
  3. deriv=(val(n,:))/2.559375; i dont undrstand 'val' it gives error when i run it and says fix val with eval and again gives me error
can you help me please?

카테고리

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

태그

Community Treasure Hunt

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

Start Hunting!

Translated by