Chapter 13

Hints and Solutions

H1   Signal fundamentals

H2   Discrete time signals and sampling

H2.1 (An illustration of the sampling theorem) (see page 63)

  1. Because Fs = 500 Hz is greater than twice the signal's frequency (that is, 2 × 200 Hz), the sampling makes it possible to perfectly reconstruct the signal. Hence we end up with the same sine at the 200 Hz frequency.
  2. Because Fs = 250 Hz is smaller than twice the signal's frequency, the sampling introduces aliasing. The ±Fs shifts in the spectrum (corresponding to n = ±1 in formula 2.5) contribute to the frequency with − 250 + 200 = 50 Hz. Since the spectrum is symmetrical, everything happens as if the 200 Hz frequency were “aliased” by symmetry about the frequency Fs/2 = 125 Hz. The result of the reconstruction is a sine with the frequency 50 Hz (Figure H2.1).
  3. Type:
    %===== CECHAN2.M Ds=.1;               % Signal length F0=200;              % Frequency of the sine function Fs=input('Sampling frequency in Hz (F0=200 Hz) = '); Ts=1/Fs; Ne=Ds/Ts+1; % Number of samples K=40;                % Interpolation fonction for displaying Tc=Ts/K; Nc=Ds/Tc+1; % Nb points of the "continuous" signal %================= tpc=[0:Nc-1]*Tc; xtc=cos(2*pi*tpc*F0); % "Continuous" signal tpe=[0:Ne-1]*Ts; xte=cos(2*pi*tpe*F0); % Samples subplot(211); plot(tpc,xtc,'-',tpe,xte,'o'); %===== Interpolation function ht=sin(pi*Fs*tpc) ./ tpc /Fs / pi; ht(1)=1; Ni=200;                       % Reconstruction filter hti=[ht(Ni:-1:2) ht(1:Ni)];   % (length 2*Ni-1) ...

Get Digital Signal and Image Processing Using MATLAB now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.