From e627bdc9757ed4ecc583b5be0f7476266c33e6a8 Mon Sep 17 00:00:00 2001 From: zymon Date: Mon, 25 Apr 2022 15:06:41 +0200 Subject: [PATCH] Multichannel signal analysis introduced. `STFT.analysis` is able to handle arrays of signals without any trouble. --- src/STFT.jl | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/STFT.jl b/src/STFT.jl index 1614b97..4e01700 100644 --- a/src/STFT.jl +++ b/src/STFT.jl @@ -27,5 +27,14 @@ function analysis( _fft(sc, 1) # Convert segments to frequency-domain end +function analysis( + xs::AbstractArray{<:AbstractVector{T}}, + w::AbstractVector{T}, + L::Integer = 0, + N::Integer = length(w); +)::AbstractArray{<:AbstractMatrix{<:Complex}} where {T<:Number} + [analysis(x, w, L, N) for x ∈ xs] +end + end # module