Compute the s-plane frequency response of an IIR filter.
Usage
freqs(filt, ...)
# S3 method for default
freqs(filt, a, w, plot = TRUE, ...)
# S3 method for Arma
freqs(filt, w, ...)
# S3 method for Ma
freqs(filt, w, ...)
# S3 method for Sos
freqs(filt, w, ...)
# S3 method for Zpg
freqs(filt, w, ...)
Arguments
filt
for the default case, moving average (MA) polynomial
coefficients, specified as a numeric vector or matrix. In case of a matrix,
then each row corresponds to an output of the system. The number of columns
of b must be less than or equal to the length of a.
...
additional parameters (not used)
a
autoregressive (AR) polynomial coefficients, specified as a vector.
w
angular frequencies, specified as a positive real vector expressed
in rad/second.
plot
logical. If TRUE (default), plots the magnitude and phase
responses as a function of angular frequency, otherwise a vector of the
frequency response is returned.
Value
Frequency response, returned as a complex vector.
Details
The s-plane frequency response of the IIR filter B(s) / A(s) is
computed as H = polyval(B, 1i * W) / polyval(A, 1i * W). If called
with no output argument, a plot of magnitude and phase are displayed.