328 Practical MATLAB® Applications for Engineers
b. If f(t) = −f(−t), indicating that f(t) is an odd function with respect to t, then
ft() bnsin(nwt 0 )
n
∑
where
b
T
n ft nwtdt n
T
4
0
0
2
()sin( )
∫ for 1, and all the coefficients an^0
− 4 − 2 0 2 4
− 1
−0.5
0
0.5
1
1.5
2
2.5
3
3.5
4
nw 0 (rad/s)
Line spectrum
− 4 − 2 0 2 4
− 3
− 2
− 1
0
1
2
3
4
5
6
nw 0 (rad/s)
Angle of
Fn
(rad)
Phase spectrum
Amplitude of
Fn
FIGURE 4.1
Plots of line spectrum.
− 4 − 2 0 2 4
− 1
−0.5
0
0.5
1
1.5
2
2.5
3
3.5
4
nw 0 (rad/s)
Magnitude of
Fn
Magnitude spectrum
− 4 − 2 0 2 4
− 1
0
1
2
3
4
5
6
7
8
9
10
nw 0 (rad/s)
mag (
Fn
(^2) )
(w
)
Power spectrum (for T = 1)
FIGURE 4.2
Plots of magnitude and power spectrum.