y[n] + 0.9 y[n-2] = 0.3 x[n] + 0.6 x[n-1] + 0.3 x[n-2].
Use Matlab to generate the frequency transfer function H(w) without using fft
or freqz
. Use the explicit
equation (see Mitra eq. 3.96, p 150). Plot the following
[y,Fs] = auread('aufile')
loads
a sound file specified by the string aufile
, returning the sampled data in y
and the sample rate (Fs) in Hertz.
Find the Discrete Fourier Transform (DFT) of y using fft
.
sortrows
to sort the first half
of the output array (why only half?) and associating the corresponding index
values
for the two largest elements with frequencies. Find the difference in
frequency between two adjacent samples. This gives an indication of
the uncertainty in frequency value.
Maintained by John Loomis, last updated 8 Sept 2005