6.5. Exercises#

Exercise 6.1

In general, magnitude is not a linear operation for complex numbers: \(|w + z| \neq |w| + |z|\). Are there any special cases where this equality does hold? That is, can you find two complex numbers \(w\) and \(z\) such that \(|w + z| = |w| + |z|\)? If so, what general property must these numbers satisfy to ensure that equality holds?

Exercise 6.2

The DFT shifting theorem gives an equation to express \(Y[m]\) as a complex rotation of \(X[m]\) when \(y[n]\) is a cyclic shift of \(x[n]\). For a fixed frequency index \(m\) and signal length \(N\), can you find a delay \(d \notin \{0, N\}\) such that \(X[m] = Y[m]\)? That is, is there a non-trivial delay that leaves \(X[m]\) unchanged?

Exercise 6.3

Let \(y[n] = x[N-n]\) be the time-reversal of \(x[n]\). What can you say about how the DFT \(Y[m]\) relates to \(X[m]\)?

Exercise 6.4

Create (or find) a recording of an instrument playing a single, isolated note. Analyze the recording using:

  • No windowing function: np.fft.rfft(x)

  • Hann window: np.fft.rfft(x * scipy.signal.hann(len(x), sym=False))

  • Two other window functions of your choice: e.g., Hamming, triangular, Kaiser, Blackman-Harris, etc.

How do the resulting spectra compare to each other, qualitatively? In particular, how do the height and widths of the spectral peaks change when different windows are used?