Time Domain Representation of Continuous and Discrete Signals 51
wk10 = kaiser(31,10);
plot(n,wk3,’*’,n,wk7,’d’,n,wk10,’o’);
hold
plot(n,wk3,n,wk7’,n,wk10);
title(‘KAISER windows for \beta=3,7, and 10 ‘);
xlabel(‘points n’);
ylabel(‘Amplitude’)
legend(‘\beta:3’,’\beta:7’,’\beta:10’);
The script fi le Kaisers is executed and the resulting plots are shown in Figure 1.41.
Observe from Figure 1.41 that the larger the β the sharper the shape.
R.1.159 The script fi le win_tri_rect_bar returns the plots of the triangular, rectangular, and
Bartlett window plots using an N = 31 approximation. The resulting plots are
shown in Figure 1.42.
MATLAB Solution
% Script file: win _ tri _ rect _ bar
% This file returns the plots of the
% TRIANGULAR, RECTANGULAR and
% BARTLETT windows
% using a 31 point approximation
%**************************************
clc; clf;
n = -15:1:15;
KAISER windows for β= 3, 7, and 10
1
0.8
0.7
0.6
0.5
0.4
0.3
0.2
0.1
0
0.9
− 15 −^10 −^5051015
Amplitude
β:3
β:7
β:10
points n
FIGURE 1.41
Plots of the Kaiser windows of R.1.158.