← All MATLAB Flashcard Decks

Signal Processing Flashcards

7 cards from real MATLAB practice questions. Tap to flip, then mark Knew It or Still Learning — missed cards come back until you master them.

Read the first 7 Signal Processing flashcards as text
  1. What does the MATLAB `fftshift(X)` function do to the output of `fft`?

    Answer: Shifts the zero-frequency component to the center of the spectrum

    `fftshift` rearranges the FFT output so that the zero-frequency (DC) component is centered, making two-sided spectra easier to visualize.

  2. Which MATLAB window function call produces a Hamming window of length N?

    Answer: hamming(N)

    `hamming(N)` returns an N-point Hamming window, a raised cosine with coefficients that minimize the maximum sidelobe level.

  3. What does the MATLAB `hilbert(x)` function return?

    Answer: The analytic signal of x, with the original signal as real part and its Hilbert transform as imaginary part

    `hilbert(x)` returns the analytic signal, where the real part is x and the imaginary part is the Hilbert transform of x, useful for computing the envelope.

  4. Which MATLAB function designs a Chebyshev Type I IIR lowpass filter with ripple Rp dB in the passband?

    Answer: cheby1(n, Rp, Wn)

    `cheby1(n, Rp, Wn)` designs a Chebyshev Type I filter that has equiripple in the passband and a monotonic stopband response.

  5. Why is `filtfilt(b, a, x)` preferred over `filter(b, a, x)` in many signal processing applications?

    Answer: It achieves zero-phase distortion by filtering the signal forward and backward

    `filtfilt` applies the filter twice — once forward and once backward — so phase shifts cancel out, yielding zero phase delay.

  6. In MATLAB's `fft(x, N)`, what does the parameter N specify?

    Answer: The number of FFT points (DFT length), zero-padding x if N > length(x)

    N sets the DFT length; if N exceeds the signal length, MATLAB zero-pads x to N samples, providing interpolated frequency resolution.

  7. Which MATLAB function directly computes the signal-to-noise ratio (SNR) in dB of a measured signal relative to a reference?

    Answer: snr(x, ref)

    `snr(x, ref)` computes the SNR in dB by comparing the power of the reference signal to the power of the noise (x minus ref).