Template Function tap::algorithms::expandPolynomial¶
Defined in File butterworth.hpp
Function Documentation¶
-
template<uint8_t ORDER>
constexpr std::array<double, ORDER + 1> tap::algorithms::expandPolynomial(std::array<std::complex<double>, ORDER> zeros)¶ used to multiply out a series of zeros to obtain a list of coefficients
Note
the coefficients are returned as doubles, the imaginary part of the complex number is ignored
- Parameters:
zeros – [in] a vector of complex poles or zeros to multiply out, works for any polynomial in the form of (x - z1)(x - z2)…(x - zn) where z1, z2, … zn are the value of zeros.
- Returns:
a vector of coefficients for the polynomial with the 0th index being the constant term and the last index being the leading coefficient