R3 -- Matlab Round #2 Starting... ============================================================ [We start XX.15 by overview, creating subdirectories and opening Matlab.] Problem 1. ============================================================ [Problem 1, XX.25 ~ XX.50] 16400 Hz aliases down to 400 Hz, because of too low sampling frequency. Consider sampling as taking samples of continuous t by interval T = 1/fT. In other words, substitute t by n/fT. x(t) = cos(2 pi 16400 t) x[n] = cos(2 pi 16400/16000 n), where t <- n/fT = cos(2 pi 16400/16000 n - 2 pi 16000/16000 n) = cos(2 pi 400/16000 n) x_r(t) = cos(2 pi 400 t), where n/fT <- t Here normalized angular frequency, cos(omega n): omega1 = 2 pi (400/16000) = 0.05 pi, and omega2 = 2 pi (16400/16000) = 2.05 pi = 0.05 pi + 2 pi Missing code: hold on; y2 = 2.5 * cos(2*pi*16400*t + pi/6); plot(t, y2) Problem 2. ============================================================ [Problem 2, ~XX.50 ~ XY.25] Find /i/ and /s/: see difference in Figure 1 and 3. fT = 22050 Hz M = 29001 --> length in seconds 29001/22050 ~ 1.3 s Figure 2: frequency content of x is changing during 1.3 seconds. DFT of the whole x is "sum" of /i/ and /s/ - not good. Spectrogram = "Short-time Fourier Transform" in Mitra's book. Take a small time window in x[n] (20-50 ms), compute spectrum, plot the spectrum with colors as a narrow column in a spectrogram, and advance to the next time window... Problem 3. ============================================================ [Problem 3, ~XX.25 ~ XY.45] See also [P21]. Here we apply filter h for input signal x and get the filtered signal y as shown in the basic scheme: x -> [h] -> y Missing line in ma2.m: y(k) = ( x(k) + x(k-1) ) / 2; This is now 1st order FIR filter. Even if there is some difference in the figure, it is hard to _hear_ any difference. In practice, the filter order can be, e.g., 100 instead of 1, and then you really can notice the effect of filtering. Extra problem ============================================================ Return the spectra, code and the fundamental frequency/period as attachment with other mid term exam exercises.