diff --git a/src/Filters/design.jl b/src/Filters/design.jl index 3472b1174..e13aff33b 100644 --- a/src/Filters/design.jl +++ b/src/Filters/design.jl @@ -234,13 +234,13 @@ Elliptic(n::Integer, rp::Real, rs::Real) = Elliptic(Float64, n, rp, rs) # returns frequency in half-cycles per sample ∈ (0, 1) function normalize_freq(w::Real, fs::Real) w <= 0 && throw(DomainError(w, "frequencies must be positive")) - f = 2*w/fs + f = 2 * w / fs f >= 1 && throw(DomainError(f, "frequencies must be less than the Nyquist frequency $(fs/2)")) f end function normalize_complex_freq(w::Real, fs::Real) - f = 2*w/fs - f >= 2 && error("frequencies must be less than the Nyquist frequency $(fs)") + f = 2 * w / fs + f >= 2 && throw(DomainError(f, "frequencies must be less than the Nyquist frequency $(fs)")) f end