Skip to main content

freqz

Function freqz 

Source
pub fn freqz<T: IsAnalytic>(
    b: &[T],
    a: Option<&[T]>,
    wor_n: Option<FreqzWorN>,
    whole: Option<bool>,
    fs: Option<f64>,
    include_nyquist: Option<bool>,
) -> Result<FreqzResult, ErrorsJSL>
Expand description

Compute the frequency response of a digital filter.

Arguments:

  • b: numerator coefficients
  • a: optional denominator coefficients; defaults to [1] when omitted
  • wor_n: optional frequency-grid specification; defaults to 512 points
  • whole: optional; defaults to false. When true and wor_n is an integer, evaluate the whole unit circle and return the axis in ascending order on [-fs/2, fs/2)
  • fs: sampling frequency used for the returned axis units; defaults to 2*pi, matching SciPy’s radians/sample convention
  • include_nyquist: optional; defaults to true. Only used for non-whole integer grids

Notes:

  • If wor_n is FreqzWorN::Frequencies, the explicit frequencies are used as-is and whole is ignored, matching SciPy’s behavior.
  • This implementation does not include SciPy’s plotting callback.