《DSP using MATLAB》Problem 6.11
代码:
- %% ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
- %% Output Info about this m-file
- fprintf('\n***********************************************************\n');
- fprintf(' <DSP using MATLAB> Problem 6.11 \n\n');
- banner();
- %% ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
- b = [0.051 0.088 0.060 -0.029 -0.0690 -0.046]; nb = [0:5];
- a = [1.000 -1.340 1.478 -0.789 0.2320]; na = [0:4];
- format short;
- fprintf('\nConvert DIRECT-form to PARALLEL-form : \n');
- [C, Bp, Ap] = dir2par(b, a)
- %C = 0;
- fprintf('\nConvert DIRECT-form to CASCADE-form : \n');
- [b0, Bc, Ac] = dir2cas(b, a)
- fprintf('\nConvert TF-form to SOS-form : \n');
- [sos, g] = tf2sos(b, a)
- fprintf('\nConvert DIRECT-form to LATTICE-LADDER-form : \n');
- [P, R] = deconv(b, a)
- [p, np, r, nr] = deconv_m(b, nb, a, na)
- [Klr, Clr] = dir2ladr(R, a)
- fprintf('\nConvert DIRECT-form to MATLAB LATTICE-LADDER-form : \n');
- [K, V] = tf2latc(R, a)
- % -----------------------------------------
- % START check
- % -----------------------------------------
- n = [0:7];
- delta = impseq(0, 0, 7)
- %format long
- format short
- hcas = casfiltr(b0, Bc, Ac, delta)
- hpar = parfiltr(C, Bp, Ap, delta)
- hladr = ladrfilt(Klr, Clr, delta)
- hdir = filter(b, a, delta)
- % -------------------------------------------
- % END check
- % -------------------------------------------
- figure('NumberTitle', 'off', 'Name', 'P6.11 hcas(n), hpar(n)')
- set(gcf,'Color','white');
- subplot(2,1,1); stem(n, hcas);
- xlabel('n'); ylabel('hcas(n)');
- title('hcas(n)'); grid on;
- subplot(2,1,2); stem(n, hpar);
- xlabel('n'); ylabel('hpar(n)');
- title('hpar(n)'); grid on;
- figure('NumberTitle', 'off', 'Name', 'P6.11 hladr(n) hdir(n)')
- set(gcf,'Color','white');
- subplot(2,1,1); stem(n, hladr);
- xlabel('n'); ylabel('hladr(n)');
- title('hladr(n)'); grid on;
- subplot(2,1,2); stem(n, hdir);
- xlabel('n'); ylabel('hdir(n)');
- title('hdir(n)'); grid on;
运行结果:
这里只放并联形式系数的图,其它形式系数不附图了。
《DSP using MATLAB》Problem 6.11的更多相关文章
- 《DSP using MATLAB》Problem 7.11
代码: %% ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ %% Output In ...
- 《DSP using MATLAB》Problem 5.11
代码: %% ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ %% Output In ...
- 《DSP using MATLAB》Problem 4.11
代码: %% ---------------------------------------------------------------------------- %% Output Info a ...
- 《DSP using MATLAB》Problem 8.11
代码: %% ------------------------------------------------------------------------ %% Output Info about ...
- 《DSP using MATLAB》Problem 7.16
使用一种固定窗函数法设计带通滤波器. 代码: %% ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ...
- 《DSP using MATLAB》Problem 7.6
代码: 子函数ampl_res function [Hr,w,P,L] = ampl_res(h); % % function [Hr,w,P,L] = Ampl_res(h) % Computes ...
- 《DSP using MATLAB》Problem 5.21
证明: 代码: %% ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ...
- 《DSP using MATLAB》Problem 5.20
窗外的知了叽叽喳喳叫个不停,屋里温度应该有30°,伏天的日子难过啊! 频率域的方法来计算圆周移位 代码: 子函数的 function y = cirshftf(x, m, N) %% -------- ...
- 《DSP using MATLAB》Problem 5.14
说明:这两个小题的数学证明过程都不会,欢迎博友赐教. 直接上代码: %% +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ...
随机推荐
- laravel的日志服务
日志服务使用: $app=app(); $log=$app->make('log'); $log->info('post_index',['data'=>'this is post ...
- DMA-总结
概念DMA “Direct Memory Access(存储器直接访问).这是指一种高速的数据传输操作,允许在外部设备和存储器之间直接读写数据.整个数据传输操作在一个称为"DMA控制器&qu ...
- Uboot USB模式(RK3288变砖头的解决办法)
RK3288启动后有三种模式,可以分别进行操作. 第一种是normal也就是正常的启动模式.这个模式无法刷固件.一般板子通电就是这个模式 第二种是loader模式.就是刷固件模式.这个模式可以刷各种i ...
- .NetCore发布到Centos docker
将.netcore mvc项目发布到centos7的docker中.环境 vmware14+Centos7+docker-ce 1.使用vs将.netcoremvc项目发布到本地,修改发布后的目录 名 ...
- [转载]mysqlcreate新建用户host使用%,本地无法连接原因及解决方法
转载自 http://www.2cto.com/database/201307/225781.html mysql,因为root权限过高,所以新建一用户appadmin,权限仅为要用到的数据库.创建语 ...
- Python Django 之 基于JQUERY的AJAX 登录页面
一.基于Jquery的Ajax的实现 1.url 2.vews 3.templates
- C++11新特性,bind,基于对象
body, table{font-family: 微软雅黑; font-size: 10pt} table{border-collapse: collapse; border: solid gray; ...
- ES6-循环
forEach 方法来遍历数组,不能使用break语句中断循环,也不能使用return语句返回到外层函数 myArray.forEach(function (value) { console.log( ...
- 首次编译Java小程序
public class helloworld { public static void main(string[] args) { system.out.println("hello wo ...
- python的编码与转码
编码问题一直是初学者的难题,搞不明白.甚至一些程序员做了多年的程序,但是编码一直整不清,下面就来认识认识编码吧. ASCII(American Standard Code for Informatio ...