Get frequency value from the Continuous Wavelet Transform

6 vues (au cours des 30 derniers jours)
Angus Joyce
Angus Joyce le 25 Sep 2019
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. Wavelet_0.jpg

Réponse acceptée

Robert U
Robert U le 25 Sep 2019
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

Plus de réponses (0)

Catégories

En savoir plus sur Continuous Wavelet Transforms dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by