Low frequency results using poctave

3 ビュー (過去 30 日間)
Hiroyuki Kawagoe
Hiroyuki Kawagoe 2025 年 6 月 26 日
コメント済み: Mathieu NOE 2025 年 7 月 4 日
Now I have time-waveform data with time span of 40s and dt 1e-3 s, and I want the octave spectrum of the waveform under 1 Hz.
However, unfortunately, it seems that using "poctave" function, we can get spectrum only over 3 Hz, according to the instruction of the function.
Can I get low frequency octave spectrum?

回答 (1 件)

Mathieu NOE
Mathieu NOE 2025 年 6 月 26 日
hello
right, poctave does not go below 3 Hz in the best case and that's already low enough for acoustics (normally)
unless you want to rework / extend some existing code (attached FYI) , my 2 cents suggestion would be simply to "fool" poctave by passing a xx times higher sampling rate argument then divide the resulting octave bands central frequencies by the same factor (I opted for power of 2 factor so that we stay in line with the definition of the octave bands)
Of course there is a bit of extra work to put back everything nicely in a bar plot ..
quick and dirty example below :
% your data (dummy)
dt= 1e-3;
fs = 1/dt;
duration = 40;
t = (0:dt:duration);
freq = 1;
y = sin(2*pi*freq*t)+0.1*randn(size(t));
% shift Fs
Fs_factor = 32;
fss = fs*Fs_factor;
[p,cf] = poctave(y,fss,'FrequencyLimits',[3 fs/2]);
cf = cf/Fs_factor
cf = 8×1
0.1244 0.2482 0.4953 0.9882 1.9717 3.9341 7.8496 15.6621
<mw-icon class=""></mw-icon>
<mw-icon class=""></mw-icon>
% show the results in dB ref 20 microP
refdB = 20*log10(20e-6);
P_dB = 20*log10(p) - refdB;
plot(cf,P_dB,'-*')
set(gca,'Xscale','log');
  2 件のコメント
Mathieu NOE
Mathieu NOE 2025 年 6 月 26 日
and here are the other solution / files Ipromised you , but there is more work to extend the filter banks to even lower frequencies
Mathieu NOE
Mathieu NOE 2025 年 7 月 4 日
hello again
problem solved ?

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeMeasurements and Spatial Audio についてさらに検索

製品


リリース

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by