46
Practical MATLAB
® Applications for Engineers
R.1.139 The process of limiting or truncating a function or sequence consisting of an infi -
nite or a very large number of samples such as
f n
F n l
l
l
( )
(
)
ϭ
ϭ ϱ
ϩϱ
Ϫ
Ϫ
∑
is by approximating f(n) by another f a (n), consisting of a fi nite number of samples
(2N + 1) given by
f n
F n l
a
l
l
N
N
( )
(
)
ϭ
ϭ
Ϫ
Ϫ
ϩ
∑
Mathematically, the truncation process is accomplished by multiplying the
function f(n) by another function w(n) called rectangular window, where w(n) is
defi ned by
w n
n
N
n
N
( )
| |
| |
ϭ
1
0
Ͻ
Ͼ
Observe that the lengths of w(n) and f a (n) are 2N + 1. The rectangular window is
the simplest model used to truncate a function and all the weighing coeffi cients used
for that purpose are one. Note that w(n) is equivalent to the pulse function pul(n/N).
R.1.140 The practical way to deal with a function f(n), which has an infi nite range, is by
truncating f(n). Therefore,
f a (n) = f (n) * w(n)
An additional objective of w(n) is to improve the smoothness of f a (n) by removing
oscillations associated with a sharp truncation process.
R.1.141 Practical considerations of the truncation process and the use of different window
models are better understood in the frequency domain with applications in fi lter
design (see Chapters 4 and 6).
R.1.142 Many window models have been proposed by mathematicians and engineers over
the last century. All the window models share similar properties such as
a. The sample located at n = 0 is multiplied (scaled) by 1 (unaffected).
b. The shape of f(n) is relatively unaffected for n < |N|.
c. The shape of f(n) is increasingly affected for the values of n in the vicinity of
|N|.
d. The window coeffi cients range from 1 to 0, where 1 corresponds to the value at
n = 0 and the smaller coeffi cients are for the larger values of n as n approaches N.
e. All window models are of fi nite length and the point of symmetry is located at
the midpoint [length (w(n))]/2.
R.1.143 When an arbitrary function presents a discontinuity and is approximated by a
large, but fi nite number of terms, a ripple is generated at the discontinuity with
a magnitude of about 10% of the jump value. This behavior is referred to as the
Gibb’s phenomenon (see Chapter 4 for more details). The objective of the various
window models is to reduce the Gibb’s effect that translates into oscillations.
CRC_47760_CH001.indd 46
CRC_47760_CH001.indd 46
7/25/2008 4:16:19 PM
7/25/2008 4:16:19 PM
Practical MATLAB
® Applications for Engineers
R.1.139 The process of limiting or truncating a function or sequence consisting of an infi -
nite or a very large number of samples such as
f n
F n l
l
l
( )
(
)
ϭ
ϭ ϱ
ϩϱ
Ϫ
Ϫ
∑
is by approximating f(n) by another f a (n), consisting of a fi nite number of samples
(2N + 1) given by
f n
F n l
a
l
l
N
N
( )
(
)
ϭ
ϭ
Ϫ
Ϫ
ϩ
∑
Mathematically, the truncation process is accomplished by multiplying the
function f(n) by another function w(n) called rectangular window, where w(n) is
defi ned by
w n
n
N
n
N
( )
| |
| |
ϭ
1
0
Ͻ
Ͼ
Observe that the lengths of w(n) and f a (n) are 2N + 1. The rectangular window is
the simplest model used to truncate a function and all the weighing coeffi cients used
for that purpose are one. Note that w(n) is equivalent to the pulse function pul(n/N).
R.1.140 The practical way to deal with a function f(n), which has an infi nite range, is by
truncating f(n). Therefore,
f a (n) = f (n) * w(n)
An additional objective of w(n) is to improve the smoothness of f a (n) by removing
oscillations associated with a sharp truncation process.
R.1.141 Practical considerations of the truncation process and the use of different window
models are better understood in the frequency domain with applications in fi lter
design (see Chapters 4 and 6).
R.1.142 Many window models have been proposed by mathematicians and engineers over
the last century. All the window models share similar properties such as
a. The sample located at n = 0 is multiplied (scaled) by 1 (unaffected).
b. The shape of f(n) is relatively unaffected for n < |N|.
c. The shape of f(n) is increasingly affected for the values of n in the vicinity of
|N|.
d. The window coeffi cients range from 1 to 0, where 1 corresponds to the value at
n = 0 and the smaller coeffi cients are for the larger values of n as n approaches N.
e. All window models are of fi nite length and the point of symmetry is located at
the midpoint [length (w(n))]/2.
R.1.143 When an arbitrary function presents a discontinuity and is approximated by a
large, but fi nite number of terms, a ripple is generated at the discontinuity with
a magnitude of about 10% of the jump value. This behavior is referred to as the
Gibb’s phenomenon (see Chapter 4 for more details). The objective of the various
window models is to reduce the Gibb’s effect that translates into oscillations.
CRC_47760_CH001.indd 46
CRC_47760_CH001.indd 46
7/25/2008 4:16:19 PM
7/25/2008 4:16:19 PM
