没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论


















Solutions Manual
for
Digital Signal Processing using Matlab - Second Edition
©Vinay K. Ingle
2007

2 Solutions Manual for DSP using Matlab (2nd Edition) 2006

Chapter 2
Discrete-Time Signals and Systems
P2.1 Generate the following sequences using the basic Matlab signal functions and the basic Matlab signal
operations discussed in this chapter. Plot signal samples using the stem function.
1. x
1
(n) = 3δ(n + 2) + 2δ(n) − δ(n − 3) + 5δ(n − 7), −5 ≤ n ≤ 15
% P0201a: x1(n) = 3*delta(n + 2) + 2*delta(n) - delta(n - 3) +
% 5*delta(n - 7), -5 <= n <= 15.
clc; close all;
x1 = 3*impseq(-2,-5,15) + 2*impseq(0,-5,15) - impseq(3,-5,15) ...
+ 5*impseq(7,-5,15);
Hf_1 = figure; set(Hf_1,’NumberTitle’,’off’,’Name’,’P0201a’); n1 = [-5:15];
Hs = stem(n1,x1,’filled’); set(Hs,’markersize’,2);
axis([min(n1)-1,max(n1)+1,min(x1)-1,max(x1)+1]);
xlabel(’n’,’FontSize’,LFS); ylabel(’x_1(n)’,’FontSize’,LFS);
title(’Sequence x_1(n)’,’FontSize’,TFS);
set(gca,’XTickMode’,’manual’,’XTick’,n1,’FontSize’,8);
print -deps2 ../EPSFILES/P0201a;
The plots of x
1
(n) is shown in Figure 2.1.
3

4 Solutions Manual for DSP using Matlab (2nd Edition) 2006
−5 −4 −3 −2 −1 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
−2
−1
0
1
2
3
4
5
6
n
x
1
(n)
Sequence x
1
(n)
Figure 2.1: Problem P2.1.1 sequence plot

2006 Solutions Manual for DSP using Matlab (2nd Edition) 5
2. x
2
(n) =
5
X
k=−5
e
−|k|
δ(n − 2k), −10 ≤ n ≤ 10.
% P0201b: x2(n) = sum_{k = -5}^{5} e^{-|k|}*delta(n - 2k), -10 <= n <= 10
clc; close all;
n2 = [-10:10]; x2 = zeros(1,length(n2));
for k = -5:5
x2 = x2 + exp(-abs(k))*impseq(2*k ,-10,10);
end
Hf_1 = figure; set(Hf_1,’NumberTitle’,’off’,’Name’,’P0201b’);
Hs = stem(n2,x2,’filled’); set(Hs,’markersize’,2);
axis([min(n2)-1,max(n2)+1,min(x2)-1,max(x2)+1]);
xlabel(’n’,’FontSize’,LFS); ylabel(’x_2(n)’,’FontSize’,LFS);
title(’Sequence x_2(n)’,’FontSize’,TFS);
set(gca,’XTickMode’,’manual’,’XTick’,n2);
print -deps2 ../EPSFILES/P0201b;
The plots of x
2
(n) is shown in Figure 2.2.
−10 −9 −8 −7 −6 −5 −4 −3 −2 −1 0 1 2 3 4 5 6 7 8 9 10
−1
−0.5
0
0.5
1
1.5
2
n
x
2
(n)
Sequence x
2
(n)
Figure 2.2: Problem P2.1.2 sequence plot
剩余394页未读,继续阅读
资源评论


junguo
- 粉丝: 108
- 资源: 2
上传资源 快速赚钱
我的内容管理 展开
我的资源 快来上传第一个资源
我的收益
登录查看自己的收益我的积分 登录查看自己的积分
我的C币 登录后查看C币余额
我的收藏
我的下载
下载帮助


安全验证
文档复制为VIP权益,开通VIP直接复制
