stft

Computes the short time Fourier transform

  1. auto stft(Xs xs, size_t nperseg, size_t noverlap)
    stft
    (
    alias windowFun = hann
    Xs
    )
    (
    Xs xs
    ,
    size_t nperseg
    ,
    size_t noverlap
    )
    if (
    isSlice!Xs &&
    DimensionCount!Xs == 1
    )
    out (ret) { static assert (DimensionCount!(typeof(return)) == 2); assert (ret.length!1 == nperseg); }
  2. auto stft(Xs xs, size_t nperseg)

Parameters

xs Xs

input 1d slice with the shape (ntimes,)

nperseg size_t

(default 256) short-time frame width for each FFT segment

noverlap size_t

(default nperseg / 2) short-time frame overlapped length for each FFT segment

Return Value

Type: auto

comlex 2d slice (nframes, nfreqs=nperseg)

See Also

Meta