From 19f0525ab97fe8f4ec26be850dd625e83959000b Mon Sep 17 00:00:00 2001 From: Erik Buer Date: Fri, 29 Dec 2023 21:10:50 +0100 Subject: [PATCH] convolve xcorr: fix incorrect function docs Signed-off-by: Erik Buer --- src/dspbase.jl | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/dspbase.jl b/src/dspbase.jl index 0c4334946..a2d9b9035 100644 --- a/src/dspbase.jl +++ b/src/dspbase.jl @@ -683,8 +683,8 @@ const RealOrComplexFloat = Union{AbstractFloat, Complex{T} where T<:AbstractFloa """ conv(u,v) -Convolution of two arrays. Uses either FFT convolution or overlap-save, -depending on the size of the input. `u` and `v` can be N-dimensional arrays, +Convolution of two arrays by using FFT-convolution. +`u` and `v` can be N-dimensional arrays, with arbitrary indexing offsets, but their axes must be a `UnitRange`. """ function conv(u::AbstractArray{T, N}, @@ -767,9 +767,7 @@ end """ xcorr(u,v; padmode = :none) -Compute the cross-correlation of two vectors, by calculating the similarity -between `u` and `v` with various offsets of `v`. Delaying `u` relative to `v` -will shift the result to the right. +Compute the cross-correlation of two vectors, `u` and `v`, through FFT-correlation. The size of the output depends on the padmode keyword argument: with padmode = :none the length of the result will be length(u) + length(v) - 1, as with conv. @@ -793,4 +791,4 @@ function xcorr( else throw(ArgumentError("padmode keyword argument must be either :none or :longest")) end -end +end \ No newline at end of file