Get frequency value from the Continuous Wavelet Transform
5 次查看(过去 30 天)
显示 更早的评论
Hi There,
I'm using the CWT (1D) to analyze the frequency of small acoustic impulses. Based on the scalogram generated, I'm interested in extracting the frequency value from the higest magnitude component (In this case it's about 2KHz.
0 个评论
采纳的回答
Robert U
2019-9-25
Hi Angus Joyce:
You did not provide any data, thus I could not work on your example. The mathworks example files for wavelet transforms are sufficient to show you a way to retrieve the requested data.
% matlab example
load mtlb % load example file
cwt(mtlb,'bump',Fs) % produce plot
[wt,f] = cwt(mtlb,'bump',Fs); % get matrix and frequency vector from cwt()
% get index of maximum value of returned matrix
[~,tmp] = max(wt);
[~,tmp2] = max(max(wt));
ind = [tmp(tmp2),tmp2];
% get frequency of maximum
f(ind(1))
% get time of maximum
(ind(2)-1) * 1/Fs
Kind regards,
Robert
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Continuous Wavelet Transforms 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!