《DSP using MATLAB》Problem 4.18
代码:
- %% ------------------------------------------------------------------------
- %% Output Info about this m-file
- fprintf('\n***********************************************************\n');
- fprintf(' <DSP using MATLAB> Problem 4.18 \n\n');
- banner();
- %% ------------------------------------------------------------------------
- % ---------------------------------------
- % 1 H1(z)
- % ---------------------------------------
- b = 1/4*[1, 2, 0, 1]; a = [1]; %
- [R, p, C] = residuez(b,a)
- Mp = (abs(p))'
- Ap = (angle(p))'/pi
- %% ----------------------------------------------
- %% START a determine H(z) and sketch
- %% ----------------------------------------------
- figure('NumberTitle', 'off', 'Name', 'P4.18.1 H(z) its pole-zero plot')
- set(gcf,'Color','white');
- zplane(b,a);
- title('pole-zero plot'); grid on;
- %% ----------------------------------------------
- %% END
- %% ----------------------------------------------
- % ------------------------------------
- % y1(n) Output
- % ------------------------------------
- yb1 = conv(b, [2]);
- ya1 = conv(a, [1,-0.9]);
- [R1, p1, C1] = residuez(yb1, ya1)
- Mp = (abs(p1))'
- Ap = (angle(p1))'/pi
- [delta, n] = impseq(0, 0, 7);
- y1_check = filter(yb1, ya1, delta) % check sequence
- y1_answer = -1.7970*impseq(0,0,7) - 0.6173*impseq(1,0,7) - 0.5556*impseq(2,0,7) + 2.2970*(0.9).^n .* stepseq(0,0,7) % answer sequence
运行结果:
只做第1小题了,后面的多少有些出入之处,以后有机会补上。
《DSP using MATLAB》Problem 4.18的更多相关文章
- 《DSP using MATLAB》Problem 6.18
代码: %% ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ %% Output In ...
- 《DSP using MATLAB》Problem 5.18
代码: %% ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ %% O ...
- 《DSP using MATLAB》Problem 3.18
代码: %% ------------------------------------------------------------------------ %% Output Info about ...
- 《DSP using MATLAB》Problem 2.18
1.代码: function [y, H] = conv_tp(h, x) % Linear Convolution using Toeplitz Matrix % ----------------- ...
- 《DSP using MATLAB》Problem 8.18
代码: %% ------------------------------------------------------------------------ %% Output Info about ...
- 《DSP using MATLAB》Problem 5.15
代码: %% ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ %% Output In ...
- 《DSP using MATLAB》Problem 4.15
只会做前两个, 代码: %% ---------------------------------------------------------------------------- %% Outpu ...
- 《DSP using MATLAB》Problem 7.27
代码: %% ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ %% Output In ...
- 《DSP using MATLAB》Problem 7.26
注意:高通的线性相位FIR滤波器,不能是第2类,所以其长度必须为奇数.这里取M=31,过渡带里采样值抄书上的. 代码: %% +++++++++++++++++++++++++++++++++++++ ...
随机推荐
- [Java代码] Java是自学好还是参加培训班好?
ava 是由Sun Microsystems公司于1995年5月推出的高级程序设计语言. Java可运行于多个平台,如Windows, Mac OS,及其他多种UNIX版本的系统. 本教程给大家简单介 ...
- WebView 实现JS效果和a标签的点击事件
目前很多android app都可以显示web页面的界面,嵌入式开发,这个界面一般都是WebView这个控件加载出来的,学习该控件可以为你的app开发提升扩展性. 先说下WebView的一些优点: 可 ...
- GitHub出现Permissiondenied (publickey).
cd ~/.ssh ssh -T git@github.com 出现Permission denied(publickey).意思表示缺少公钥. ssh-keygen -t rsa -C " ...
- Python装饰器、生成器、内置函数、json
这周学习了装饰器和生成器,写下博客,记录一下装饰器和生成器相关的内容. 一.装饰器 装饰器,这个器就是函数的意思,连起来,就是装饰函数,装饰器本身也是一个函数,它的作用是用来给其他函数添加新功能,比如 ...
- Leetcode 89
回溯写到自闭:不想就删了: class Solution { public: vector<int> grayCode(int n) { vector<vector<int&g ...
- POJ 3481 SBT做法
第三次做此题.. 不解释啦. 不过变成用SBT来做啦! SBT好处在于能够保证树的高度为lgn,真真正正的平衡二叉树. 因此删除,插入操作与普通二叉树几乎相同. #include <cstdio ...
- Intel DAAL AI加速 ——传统决策树和随机森林
# file: dt_cls_dense_batch.py #===================================================================== ...
- Openwrt TF Card Auto Mount&Check (4)
1 Scope of Document This document describes tf card bootup auto do file system check when mount ...
- File storage location distribution in firmware using binwalk
tool function: Binwalk is a fast, easy to use tool for analyzing, reverse engineering, and extractin ...
- LTrim、RTrim 和 Trim 函数
返回不带前导空格 (LTrim).后续空格 (RTrim) 或前导与后续空格 (Trim) 的字符串副本. LTrim(string) RTrim(string) Trim(string) strin ...