Skip to content

Commit

Permalink
PolynomialRatio: correct doctest results
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 659635e commit d80506d
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions docs/src/filters.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,19 +27,19 @@ power (`^`) for repeated mutlpilcation with itself. For example:

```jldoctest; setup = :(using DSP)
julia> H = PolynomialRatio([1.0], [1.0, 0.3])
PolynomialRatio{:z, Float64}(Polynomials.LaurentPolynomial(1.0), Polynomials.LaurentPolynomial(0.3*z⁻¹ + 1.0))
PolynomialRatio{:z, Float64}(LaurentPolynomial(1.0), LaurentPolynomial(0.3*z⁻¹ + 1.0))
julia> inv(H)
PolynomialRatio{:z, Float64}(Polynomials.LaurentPolynomial(0.3*z⁻¹ + 1.0), Polynomials.LaurentPolynomial(1.0))
PolynomialRatio{:z, Float64}(LaurentPolynomial(0.3*z⁻¹ + 1.0), LaurentPolynomial(1.0))
julia> H * H
PolynomialRatio{:z, Float64}(Polynomials.LaurentPolynomial(1.0), Polynomials.LaurentPolynomial(0.09*z⁻² + 0.6*z⁻¹ + 1.0))
PolynomialRatio{:z, Float64}(LaurentPolynomial(1.0), LaurentPolynomial(0.09*z⁻² + 0.6*z⁻¹ + 1.0))
julia> H^2
PolynomialRatio{:z, Float64}(Polynomials.LaurentPolynomial(1.0), Polynomials.LaurentPolynomial(0.09*z⁻² + 0.6*z⁻¹ + 1.0))
PolynomialRatio{:z, Float64}(LaurentPolynomial(1.0), LaurentPolynomial(0.09*z⁻² + 0.6*z⁻¹ + 1.0))
julia> H^-2
PolynomialRatio{:z, Float64}(Polynomials.LaurentPolynomial(0.09*z⁻² + 0.6*z⁻¹ + 1.0), Polynomials.LaurentPolynomial(1.0))
PolynomialRatio{:z, Float64}(LaurentPolynomial(0.09*z⁻² + 0.6*z⁻¹ + 1.0), LaurentPolynomial(1.0))
```

Expand Down Expand Up @@ -73,6 +73,7 @@ tdfilt
tdfilt!
resample
```

## Filter design

Most analog and digital filters are constructed by composing
Expand Down Expand Up @@ -101,7 +102,6 @@ include [`remez`](@ref) which designs equiripple FIR
filters of all types, and [`iirnotch`](@ref) which designs a
2nd order "biquad" IIR notch filter.


### [Filter response types](@id response-types)

```@docs
Expand Down Expand Up @@ -146,6 +146,7 @@ FIRWindow
```

### [Direct filter design methods](@id direct-design-methods)

```@docs
remez
iirnotch
Expand Down Expand Up @@ -207,4 +208,4 @@ passband cutoff frequency of 0.2, a stopband cutoff frequency of 0.4,

```julia
(N, ωn) = ellipord(0.2, 0.4, 3, 40)
```
```

0 comments on commit d80506d

Please sign in to comment.