1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
//! We implement
//! [Pieter's Pages](https://tttapa.github.io/Pages/Mathematics/Systems-and-Control-Theory/Analog-Filters/Butterworth-Filters.html)
//! is a fine source to understand the theory presented here.
//! A Butterworth lowpass filter has the form
//!
//! ```math
//! 1
//! |H(s)|^2 = ------------------
//! 1+ (omega/omega_c)^(2n)
//! ```
//!
//! where `n`` is the order of the filter.
use abs_diff_eq;
use PoleOrZero;
use crate*;
/// Create iterator that returns the poles of a butterworth lowpass filter.
///
/// # Args
///
/// - `fc` - Cutoff-frequency in \[Hz\]
/// - `n` - Filter order