How to extract mean frequency from continuous wavelet transform (CWT)

Hello,
I have used the cwt function in Matlab 2017a to create a scalogram of an electromyography (EMG) signal. My goal is to compare the time varying mean frequencies of different EMG signals. The issue is that I'm not sure how to use the complex double output (wt) to calculate a usable mean frequency 1D waveform.

 采纳的回答

Hi,
If your question is to how to get useful information from the complex matrix of 'wt', then use the command 'abs' to get the absolute magnitude of the complex variable.
If your question is to how to extract mean data from a vector, then compute the average of the signal. You can do the same for different scales in your wt or overall average value across all scales.
Hope this helps.
Raj

4 个评论

Ah yes, thank you. Taking the absolute of the complex variable (wt) to get the magnitudes is what I needed. I then used these and the output frequency values to calculate instantaneous mean frequency according to Karlsson et al.
Karlsson, J.S., Gerdle, B., Akay, M., 2001. Analyzing surface myoelectric signals recorded during isokinetic contractions. IEEE Eng. Med. Biol. Mag. Q. Mag. Eng. Med. Biol. Soc. 20, 97–105.
Could you tell your solution~ I am also referring to the paper you mentioned, but I don't know how to calculate IMNF as suggested. Would you help me with the code so that I can compare the result with mine? I tried several ways posted online but they got me different results on the same signal. Cheers
Hi Jungyeon. Below is the code I used to calculate IMNF. It's based on the paper above and uses the [wt, f, coi] outputs from the cwt function. you'll likely need to filter the IMNF as the outcome is quite noisy.
wta=abs(wt);
s_max=length(f);
s=1:s_max;
w0 = f(1);
for i=1:size(wta,2)
w=w0./(s(2:end));
IMNFi(i)=trapz(w',w'.*wta(2:end,i))./trapz(w',wta(2:end,i));
end
Hi Brent,
even though it´s been a while since you posted the code above, I hope you can still help me with one question.
Why do you divide w0 by the second to the last scale?
Kind regards,
Christoph
w=w0./(s(2:end));

请先登录,再进行评论。

更多回答(0 个)

类别

帮助中心File Exchange 中查找有关 Time-Frequency Analysis 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by