0
$\begingroup$

I was trying to decompose an EMG signal, which was sampled at 200 Hz, into 7 levels of decomposition using DWT. And the result is shown in the figure( only up to level 3 is shown here) However, I would like to know, how to see in MATLAB that with each level, the frequency is split into high and low. How to find the power spectrum of the same(if it's possible)? So I have used this code to find out the power spectrum of level 1 detail coefficients, so the sampling rate is 200 Hz, so the highest frequency can be assumed to be 100 Hz, after one level of decomposition the d1 coefficients should be in the range of 50 to 100 Hz (correct me if I am wrong). But the problem here I am facing is that in the power spectrum it is showing power in the range of 0 to 100 Hz almost equally , I was expecting more power around 50 to 100 hz instead (Fig is inserted below). I want to understand why is it so. Also How to find out the time in which these frequency ranges are prominent.

[c,l] = wavedec(subject_2,7,'db2'); %level 7 decomposition approx = appcoef(c,l,'db2'); %approximation coefficient [cd1,cd2,cd3,cd4,cd5,cd6,cd7] = detcoef(c,l,[1 2 3 4 5 6 7]); %detail coefficients

%[P,f] = pspectrum(subject_2,400); [P,f] = pspectrum(cd1,200); figure
plot(f,pow2db(P))

enter image description here

enter image description here

$\endgroup$
6
  • 1
    $\begingroup$ Do you know Matlab's fft function? $\endgroup$
    – Jdip
    Commented Jul 14, 2023 at 11:13
  • $\begingroup$ You cannot prove something mathematically with this sort of arithmetic. You can demonstrate that particular instances are approximately true. To really prove something -- as in prove a theorem -- you need to use math and logic. $\endgroup$
    – TimWescott
    Commented Jul 14, 2023 at 16:20
  • $\begingroup$ Please edit your question to say what type of wavelet you're using, i.e. Daubechies, Haar, etc. If you mention what Matlab function you're calling, or if you can capture the actual math with a short (10 lines or less) of Matlab code, that would lend context. $\endgroup$
    – TimWescott
    Commented Jul 14, 2023 at 16:22
  • $\begingroup$ @Jdip , yes I have tried to find out the power spectrum, using this code ,:,[c,l] = wavedec(subject_2,7,'db2'); approx = appcoef(c,l,'db2'); %approximation coefficient [cd1,cd2,cd3,cd4,cd5,cd6,cd7] = detcoef(c,l,[1 2 3 4 5 6 7]); %detail coefficients %[P,f] = pspectrum(subject_2,400); [P,f] = pspectrum(cd1,200); figure plot(f,pow2db(P)) $\endgroup$ Commented Jul 15, 2023 at 14:32
  • $\begingroup$ @Jdip I have edited the question, kindly see if you can help me $\endgroup$ Commented Jul 15, 2023 at 14:55

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.