Azzera filtri
Azzera filtri

cwt関数の結果から​、振幅の最大値を抽出​する方法を教えて下さ​い。

3 visualizzazioni (ultimi 30 giorni)
勝也 秋元
勝也 秋元 il 25 Ago 2022
Commentato: 勝也 秋元 il 29 Ago 2022
<実施したい内容>
cwt関数の結果に対し、探索する領域(時間、周波数)を設定し、その範囲で振幅最大値を抽出する。
振幅最大値と時間、周波数をアウトプットにする。
添付の例)
探索区間:時間:1~2sec、周波数:4Hz以上
アウトプット(時間、周波数、最大振幅):(1.22、14.32、12.1075)

Risposte (1)

takemoto
takemoto il 29 Ago 2022
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 Commento
勝也 秋元
勝也 秋元 il 29 Ago 2022
ありがとうございます。
内容理解できました。

Accedi per commentare.

Categorie

Scopri di più su 連続ウェーブレット変換 in Help Center e File Exchange

Tag

Prodotti


Release

R2021a

Community Treasure Hunt

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

Start Hunting!