短時間フーリエ変換の解析方法について
Show older comments
短時間フーリエ変換について質問させていただきます。
フーリエ解析を行い、周波数が変化した時間とパワー変化を知りたいです。
今回モデル波形として、0.5Hz 1Hz 2Hz のsin波を用いてフーリエ解析を行ったところ、 広範囲に同じパワーの分布が見られました。 僕のイメージでは0.5Hz 1Hz 2Hzの部分に直線ラインができるのかと想像していました。 下記にコードを記載するので、spectogramの使用が間違っていたらご教示ください。
%%model wave
fs = 1000;% sample frequency(Hz)
model_timestep1 = (0:1/fs:10);
model_timestep2 = (10:1/fs:30);
model_timestep3 = (30:1/fs:40);
sinwave1 = sin(1*pi*0.5*model_timestep1);
sinwave2 = sin(1*pi*1*model_timestep2);
sinwave3 = sin(1*pi*2*model_timestep3);
S1 = horzcat(sinwave1(1:fs*10), sinwave2(1:fs*20), sinwave3(1:fs*10));
%%FFT
fftpt = fs*2; %FFTデータ長
win = fs/10;
overlap = 10;
spectrogram(S1,fftpt,win,overlap,fs,'yaxis')
axis([0,inf, -inf, 5])
Accepted Answer
More Answers (0)
Categories
Find more on MATLAB in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!