Skip to content

Commit

Permalink
doc cosmetics
Browse files Browse the repository at this point in the history
  • Loading branch information
wheeheee committed Apr 30, 2024
1 parent b2e558f commit 374fc1d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
3 changes: 1 addition & 2 deletions docs/src/periodograms.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ Common procedures like computing the [short-time Fourier transform](@ref stft),
```@docs
arraysplit
DSP.Periodograms.ArraySplit
periodogram(s::AbstractVector{T}) where T <: Number
periodogram(s::AbstractMatrix{T}) where T <: Real
periodogram
DSP.Periodograms.Periodogram
DSP.Periodograms.Periodogram2
welch_pgram
Expand Down
12 changes: 6 additions & 6 deletions src/periodograms.jl
Original file line number Diff line number Diff line change
Expand Up @@ -373,11 +373,11 @@ julia> t = (1:Fs)/Fs; # 100 time samples
julia> x = cos.(2π*25*t); # Cosine signal with 25Hz frequency
julia> pxx = periodogram(x; fs=Fs); # Periodogram
julia> pxx = periodogram(x; fs=Fs); # Periodogram
julia> _, max_index = findmax(pxx.power); # Find index of max power
julia> _, max_index = findmax(pxx.power); # Find index of max power
julia> pxx.power[max_index], pxx.freq[max_index] # (power, frequency)
julia> pxx.power[max_index], pxx.freq[max_index] # (power, frequency)
(0.5, 25.0)
```
2-sided periodogram of a rectangle function with Hamming window.
Expand Down Expand Up @@ -601,18 +601,18 @@ See [`periodogram`](@ref) for description of optional keyword arguments.
```jldoctest
julia> x = rect(10; padding=20);
julia> power(welch_pgram(x)) #1-sided periodogram
julia> power(welch_pgram(x)) # 1-sided periodogram
2-element Vector{Float64}:
0.9523809523809523
0.04761904761904761
julia> power(welch_pgram(x; onesided=false)) #2-sided periodogram
julia> power(welch_pgram(x; onesided=false)) # 2-sided periodogram
3-element Vector{Float64}:
0.9523809523809523
0.023809523809523805
0.023809523809523805
julia> power(welch_pgram(x, 5; onesided=false)) #5 samples segment
julia> power(welch_pgram(x, 5; onesided=false)) # 5 samples segment
5-element Vector{Float64}:
1.488888888888889
0.04444444444444444
Expand Down

0 comments on commit 374fc1d

Please sign in to comment.