Compute the z-plane frequency response of an ARMA model or IIR filter.
# S3 method for default
freqz(filt = 1, a = 1, n = 512, region = NULL, Fs = 2 * pi, ...)# S3 method for Arma
freqz(filt, ...)
# S3 method for Ma
freqz(filt, ...)
# S3 method for freqz
print(x, ...)
# S3 method for freqz
plot(x, ...)
# S3 method for default
freqz_plot(w, h, ...)
# S3 method for freqz
freqz_plot(w, ...)
For freqz
list of class freqz
with items:
complex array of frequency responses at those frequencies.
array of frequencies.
for the default case, the moving-average coefficients of
an ARMA model or filter. Generically, filt
specifies an arbitrary model or filter operation.
the autoregressive (recursive) coefficients of an ARMA filter.
number of points at which to evaluate the frequency response.
'half'
(the default) to evaluate around the upper half of the
unit circle or 'whole'
to evaluate around the entire unit circle.
sampling frequency in Hz. If not specified, the frequencies are in radians.
for the default case, the array of frequencies. Generically,
w
specifies an object from which to plot a frequency response.
a complex array of frequency responses at the given frequencies.
object to be plotted.
for methods of freqz
, arguments are passed to
the default method. For freqz_plot
, additional arguments are
passed through to plot
.
Original Octave version by John W. Eaton. Conversion to R by Tom Short.
For fastest computation, n
should factor into a small number of
small primes.
When results of freqz
are printed, freqz_plot
will be
called to display frequency plots of magnitude and phase. As with
lattice
plots, automatic printing does not work inside loops and
function calls, so explicit calls to print
or plot
are
needed there.
Octave Forge https://octave.sourceforge.io/
filter
, Arma
, freqs
b <- c(1, 0, -1)
a <- c(1, 0, 0, 0, 0.25)
freqz(b, a)
Run the code above in your browser using DataLab