% edit stft
で中身が見れます。例を見てみましょう。
% EXAMPLE 4:
% Compute and display the STFT of a set of intermittent sinusoid
% signals.
データの用意
clc,clear,close all;
silence = zeros(1,1500);
fs = 1e3;
t = (0:1000-1)/fs;
yStep = [sin(2*pi*50*t) silence sin(2*pi*100*t) silence sin(2*pi*150*t)].';
t = seconds((0:length(yStep)-1)/fs).';
xTable = timetable(t,yStep);
出力数なし
stft(xTable);
出力ありで再現
[S,F,T] = stft(xTable);
smag = mag2db(abs(S));
pcolor(seconds(T),F,smag)
xlabel('Time (s)')
ylabel('Frequency (Hz)')
shading flat
colorbar
clim(max(smag(:)) + [-60 0])