cwt関数の結果から、振幅の最大値を抽出する方法を教えて下さい。
Afficher commentaires plus anciens
<実施したい内容>
cwt関数の結果に対し、探索する領域(時間、周波数)を設定し、その範囲で振幅最大値を抽出する。
振幅最大値と時間、周波数をアウトプットにする。
添付の例)
探索区間:時間:1~2sec、周波数:4Hz以上
アウトプット(時間、周波数、最大振幅):(1.22、14.32、12.1075)
Réponses (1)
load mtlb
[wt,f] = cwt(mtlb,Fs);
t = 0 : 1/Fs : numel(mtlb)/Fs - 1/Fs;
tidx = 100:2000; % ROI (time)
fidx = (20:40)'; % ROI (freq)
wtROI = wt(fidx,tidx); % ROI
fROI = f(fidx);
tROI = t(tidx);
[maxwt,idx] = max(abs(wtROI(:)));
[ii, jj] = ind2sub(size(wtROI), idx);
surf(tROI,fROI,abs(wtROI).^2), view(0,90)
shading interp, hold on
plot3(tROI(jj),fROI(ii),maxwt,'ro')
text(tROI(jj)+0.01,fROI(ii),maxwt, ...
{['time: ',num2str(tROI(jj))], ...
['freq: ',num2str(fROI(ii))], ...
['mag: ',num2str(maxwt)]})
hold off
cwt関数は、出力引数を与えることで、変換結果を獲得できますので、max関数等で最大値を抽出してはいかがでしょうか?
1 commentaire
勝也 秋元
le 29 Août 2022
Catégories
En savoir plus sur 連続ウェーブレット変換 dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!