Skip to content

Commit

Permalink
xcorr: add doctest to function documentation
Browse files Browse the repository at this point in the history
Signed-off-by: Erik Buer <[email protected]>
  • Loading branch information
ErikBuer committed Dec 28, 2023
1 parent 3366870 commit 659635e
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
*.creator
*.user
*.orig
*.vscode

*.cov

Expand Down
12 changes: 12 additions & 0 deletions src/dspbase.jl
Original file line number Diff line number Diff line change
Expand Up @@ -776,6 +776,18 @@ The size of the output depends on the padmode keyword argument: with padmode =
With padmode = :longest the shorter of the arguments will be padded so they are
equal length. This gives a result with length 2*max(length(u), length(v))-1,
with the zero-lag condition at the center.
# Examples
```jldoctest
julia> xcorr([1,2,3],[1,2,3])
5-element Vector{Int64}:
3
8
14
8
3
```
"""
function xcorr(
u::AbstractVector, v::AbstractVector; padmode::Symbol = :none
Expand Down

0 comments on commit 659635e

Please sign in to comment.