636 C H A P T E R 10: Fourier Analysis of Discrete-Time Signals and Systems
10.22. Linear equations and Fourier series—MATLAB
The Fourier series of a signalx[n]and its coefficientsXkare both periodic of some valueN, and as such
can be written as
n x[n]=
N∑− 1
k= 0
Xkej^2 πnk/N 0 ≤n≤N− 1
n Xk=
1
N
N∑− 1
n= 0
x[n]e−j^2 πnk/N 0 ≤k≤N− 1
(a) To find thex[n], 0 ≤n≤N− 1 givenXk, 0 ≤k≤N− 1 , write a set ofNlinear equations. Indicate
how you would find thex[n]from the matrix equation.
(b) As you can see, there is a lot of duality in the Fourier series and its coefficients. If you consider the
reverse problem in the previous part, how would you solve forXkgiven thex[n]?
(c) Letx[n]=nforn=0, 1, 2, and 0 forn= 3 be a period of a periodic signalx[n]of periodN= 4. Use
the above method to solve for the Fourier series coefficientsXk, 0 ≤k≤ 3. Use MATLAB to find the
inverse of the complex exponential matrix.
(d) Suppose that when computing theXkfor thex[n]signal given above, you separate the sum into two
sums, one for the even values ofn(i.e.,n=0, 2) and the other for the odd values ofn(i.e.,n=1, 3).
Try to simplify the complex exponentials and write an equivalent matrix expression for theXk.
10.23. Operations on Fourier series—MATLAB
A periodic signalx[n]of periodNcan be represented by its Fourier series
x[n]=
N∑− 1
k= 0
Xkej^2 πnk/N 0 ≤n≤N− 1
If you consider this a representation ofx[n]:
(a) Isx 1 [n]=x[n−3]periodic? If so, use the Fourier series ofx[n]to obtain the Fourier series
coefficients ofx 1 [n].
(b) Letx 2 [n]=x[n]−x[n−1](i.e., the finite difference). Determine ifx 2 [n]is periodic, and if so, find its
Fourier series coefficients.
(c) Ifx 3 [n]=x[n](− 1 )n, isx 3 [n]periodic? If so, determine its Fourier series coefficients.
(d) Letx 4 [n]=sign[cos(0.5πn)]wheresign(ξ)is a function that gives 1 whenξ≥ 0 and− 1 whenξ < 0.
Determine the Fourier coefficients ofx 4 [n]if periodic.
(e) Use MATLAB to find the Fourier series coefficients forxi[n],i=1, 2, 3,and 4 and to plot them as
functions ofk.
10.24. Fourier series of even and odd signals—MATLAB
Letx[n]be an even signal andy[n]be an odd signal.
(a) Determine whether the Fourier coefficientsXkandYkcorresponding tox[n]andy[n]are complex,
real, or imaginary.
(b) Considerx[n]=cos( 2 πn/N)andy[n]=sin( 2 πn/N)forN= 3 andN= 4. Use the above results to
find the Fourier series coefficients for the two signals with the different periods.
(c) Use MATLAB to find the Fourier series coefficients of the above two signals with the different periods,
and plot their magnitude and phase spectra.
10.25. Response of LTI systems to periodic signals—MATLAB
Suppose you get noisy periodic measurements
y[n]=(− 1 )nx[n]+Aη[n]