《DSP using MATLAB》示例Example7.11

代码:
M = 45; As = 60; n = [0:1:M-1];
beta = 0.1102*(As - 8.7)
%beta = 0.1102*(As - 8.7) + 0.3 w_kai = (kaiser(M, beta))'; wc1 = pi/3; wc2 = 2*pi/3; hd = ideal_lp(wc1, M) + ideal_lp(pi, M) - ideal_lp(wc2, M); h = hd .* w_kai; [db, mag, pha, grd, w] = freqz_m(h, [1]); %Plot figure('NumberTitle', 'off', 'Name', 'Exameple 7.11')
set(gcf,'Color','white'); subplot(2,2,1); stem(n, hd); axis([0 M-1 -0.2 0.8]); grid on;
xlabel('n'); ylabel('hd(n)'); title('Ideal Impulse Response'); subplot(2,2,2); stem(n, w_kai); axis([0 M-1 0 1.1]); grid on;
xlabel('n'); ylabel('w(n)'); title('Kaiser Window'); subplot(2,2,3); stem(n, h); axis([0 M-1 -0.2 0.8]); grid on;
xlabel('n'); ylabel('h(n)'); title('Actual Impulse Response'); subplot(2,2,4); plot(w/pi, db); axis([0 1 -80 10]); grid on;
xlabel('frequency in \pi units'); ylabel('Decibels'); title('Magnitude Response in dB');
运行结果:


参数β =5.6533,最小的阻带衰减小于60dB。很明显,我们增加β 就能使得衰减达到60dB,此时β =5.9533。
将上面代码的第2个β 公式前面注释去掉,再次运行,结果如下:


此时满足设计要求。
《DSP using MATLAB》示例Example7.11的更多相关文章
- DSP using MATLAB 示例 Example3.11
用到的性质 上代码: n = -5:10; x = rand(1,length(n)); k = -100:100; w = (pi/100)*k; % freqency between -pi an ...
- DSP using MATLAB 示例Example2.11
上代码: b = [1]; a = [1, -1, 0.9]; n = [-20:120]; h = impz(b,a,n); set(gcf,'Color','white'); %subplot(2 ...
- DSP using MATLAB 示例Example3.21
代码: % Discrete-time Signal x1(n) % Ts = 0.0002; n = -25:1:25; nTs = n*Ts; Fs = 1/Ts; x = exp(-1000*a ...
- DSP using MATLAB 示例 Example3.19
代码: % Analog Signal Dt = 0.00005; t = -0.005:Dt:0.005; xa = exp(-1000*abs(t)); % Discrete-time Signa ...
- DSP using MATLAB示例Example3.18
代码: % Analog Signal Dt = 0.00005; t = -0.005:Dt:0.005; xa = exp(-1000*abs(t)); % Continuous-time Fou ...
- DSP using MATLAB 示例Example3.8
代码: x = rand(1,11); n = 0:10; k = 0:500; w = (pi/500)*k; % [0,pi] axis divided into 501 points. X = ...
- DSP using MATLAB 示例Example3.7
上代码: x1 = rand(1,11); x2 = rand(1,11); n = 0:10; alpha = 2; beta = 3; k = 0:500; w = (pi/500)*k; % [ ...
- DSP using MATlAB 示例Example2.10
上代码 % noise sequence 1 x = [3, 11, 7, 0, -1, 4, 2]; nx = [-3:3]; % given signal x(n) [y,ny] = sigshi ...
- DSP using MATLAB 示例Example3.23
代码: % Discrete-time Signal x1(n) : Ts = 0.0002 Ts = 0.0002; n = -25:1:25; nTs = n*Ts; x1 = exp(-1000 ...
随机推荐
- 阿里云centOS7.4 ftp连接不上的问题
首先查看是开启21端口 选择ECS-->安全组-->配置规则 增加21端口配置 配置如下
- Ubuntu下搭建Spark运行环境
安装Spark的方式 现在有两种安装方式: 安裝spark notebook:已經把spark, scala, hadoop等等包起來了,裝好就能用GUI介面操作,適合測試用. 傳統方式安裝:慢慢裝s ...
- spring mvc:内部资源视图解析器2(注解实现)@Controller/@RequestMapping
spring mvc:内部资源视图解析器2(注解实现) @Controller/@RequestMapping 访问地址: http://localhost:8080/guga2/hello/goo ...
- cJONS序列化工具解读三(使用案例)
cJSON使用案例 由了解了cJSON的数据结构,接口以及实现之后,那么我们来举例说明其使用. 本例子是一个简单的学生信息表格管理,我们通过键值对的方式向json中增加元素信息. 然后可以格式化输出结 ...
- 2016ACM/ICPC亚洲区沈阳站H - Guessing the Dice Roll HDU - 5955 ac自动机+概率dp+高斯消元
http://acm.hdu.edu.cn/showproblem.php?pid=5955 题意:给你长度为l的n组数,每个数1-6,每次扔色子,问你每个串第一次被匹配的概率是多少 题解:先建成ac ...
- net.paoding.analysis.exception.PaodingAnalysisException: dic home should not be a file, but a directory!
Caused by: net.paoding.analysis.exception.PaodingAnalysisException: dic home should not be a file, b ...
- iptables(五)iptables匹配条件总结之二(常用扩展模块)
iprange扩展模块 之前我们已经总结过,在不使用任何扩展模块的情况下,使用-s选项或者-d选项即可匹配报文的源地址与目标地址,而且在指定IP地址时,可以同时指定多个IP地址,每个IP用" ...
- yyyy-MM-dd EEE hh:mm:ss(日期转换)
<script> /** * 对Date的扩展,将 Date 转化为指定格式的String * 月(M).日(d).12小时(h).24小时(H).分(m).秒(s).周(E).季度(q) ...
- cf 290F. Treeland Tour 最长上升子序列 + 树的回溯 难度:1
F. Treeland Tour time limit per test 5 seconds memory limit per test 256 megabytes input standard in ...
- KindEditor富文本编辑框和BeautifulSoup的基本使用
KindEditor富文本编辑框 1.进入官网 2.下载 官网下载:http://kindeditor.net/down.php 本地下载:http://files.cnblogs.com/files ...