This is a wrapper function for specgram to draw a spectrogram with the same input argument names and defaults as the tag tools Matlab/Octave function make_specgram.
Arguments
- x
The input signal
- nfft
specifies the number of frequency points used to calculate the discrete Fourier transforms.
- fs
The sampling frequency in Hz
- window
If you specify a scalar for
window, make_specgram uses a Hanning window of that length.windowmust have length smaller than or equal tonfftand greater thannoverlap.- noverlap
The number of samples the sections of
xoverlap.- draw_plot
(logical) Should a plot be drawn? Defaults to TRUE.
Value
if draw_plot is TRUE, a plot is produced. If it is FALSE, a list is returned, with as follows. Each element is a matrix and all three matrices are the same size.
s,A matrix of spectrogram values of signal x in dB.f,Frequencies (Hz) corresponding to the rows of st,Time indices corresponding to the columns of s