《DSP using MATLAB》Problem 4.11
代码:
%% ----------------------------------------------------------------------------
%% Output Info about this m-file
fprintf('\n***********************************************************\n');
fprintf(' <DSP using MATLAB> Problem 4.11 \n\n'); banner();
%% ---------------------------------------------------------------------------- format rat;
%% -------------------------------------------------
%% 1 X1(z) rightsided
%% ------------------------------------------------- b = [1, -1, -4, 4]; nb = [0:3];
a = [1, -11/4, 13/8, -1/4]; na = [0:3]; %[p, r] = deconv(b, a)
%[p, np, r, nr] = deconv_m(b, nb, a, na)
[R, p, C] = residuez(b, a) %[delta, n] = impseq(0,0,7);
%x = filter(b, a, delta) %[b,a] = residuez(R, p, C) %Mp = abs((p))'
%Ap = angle((p))' figure('NumberTitle', 'off', 'Name', 'Problem 4.11.1 X1(z)')
set(gcf,'Color','white');
zplane(b, a); % row vector
title('Zero-Pole Plot'); xlabel('Re'); ylabel('Im'); grid on; fprintf('\n-------------------- X2(z) ------------------ \n\n');
%% -------------------------------------------------
%% 2 X2(z) absolutely summable
%% ------------------------------------------------- b = [1, 1, -4, 4]; nb = [0:3];
a = [1, -11/4, 13/8, -1/4]; na = [0:3]; %[p, r] = deconv(b, a)
%[p, np, r, nr] = deconv_m(b, nb, a, na)
[R, p, C] = residuez(b, a) %[delta, n] = impseq(0,0,7);
%x = filter(b, a, delta) %[b,a] = residuez(R, p, C) %Mp = abs((p))'
%Ap = angle((p))' figure('NumberTitle', 'off', 'Name', 'Problem 4.11.2 X2(z)')
set(gcf,'Color','white');
zplane(b, a); % row vector
title('Zero-Pole Plot'); xlabel('Re'); ylabel('Im'); grid on; fprintf('\n-------------------- X3(z) ------------------ \n\n');
%% -------------------------------------------------
%% 3 X3(z) leftsided
%% ------------------------------------------------- b = [1, -3, 4, 1]; nb = [0:3];
a = [1, -4, 1, -0.16]; na = [0:3]; %[p, r] = deconv(b, a)
%[p, np, r, nr] = deconv_m(b, nb, a, na)
[R, p, C] = residuez(b, a) %[delta, n] = impseq(0,0,7);
%x = filter(b, a, delta) %[b,a] = residuez(R, p, C) Mp = abs((p))'
Ap = angle((p))'/pi % pole angle in pi units figure('NumberTitle', 'off', 'Name', 'Problem 4.11.3 X3(z)')
set(gcf,'Color','white');
zplane(b, a); % row vector
title('Zero-Pole Plot'); xlabel('Re'); ylabel('Im'); grid on; fprintf('\n-------------------- X4(z) ------------------ \n\n');
%% -------------------------------------------------
%% 4 X4(z) leftsided
%% ------------------------------------------------- b = [0, 0, 1]; nb = [0:2];
a = [1, 2, 1.25, 0.25]; na = [0:3]; %[p, r] = deconv(b, a)
%[p, np, r, nr] = deconv_m(b, nb, a, na)
[R, p, C] = residuez(b, a) %[delta, n] = impseq(0,0,7);
%x = filter(b, a, delta) %[b,a] = residuez(R, p, C) %Mp = abs((p))'
%Ap = angle((p))' figure('NumberTitle', 'off', 'Name', 'Problem 4.11.4 X4(z)')
set(gcf,'Color','white');
zplane(b, a); % row vector
title('Zero-Pole Plot'); xlabel('Re'); ylabel('Im'); grid on; fprintf('\n-------------------- X5(z) ------------------ \n\n');
%% -------------------------------------------------
%% 5 X5(z) leftsided
%% ------------------------------------------------- b = [0, 0, 0, 1]; nb = [0:3];
a = [1, 0, -0.5, 0, 0.25*0.25]; na = [0:3]; %[p, r] = deconv(b, a)
%[p, np, r, nr] = deconv_m(b, nb, a, na)
[R, p, C] = residuez(b, a) %[delta, n] = impseq(0,0,7);
%x = filter(b, a, delta) %[b,a] = residuez(R, p, C) %Mp = abs((p))'
%Ap = angle((p))' figure('NumberTitle', 'off', 'Name', 'Problem 4.11.5 X5(z)')
set(gcf,'Color','white');
zplane(b, a); % row vector
title('Zero-Pole Plot'); xlabel('Re'); ylabel('Im'); grid on;
运行结果:
《DSP using MATLAB》Problem 4.11的更多相关文章
- 《DSP using MATLAB》Problem 7.11
代码: %% ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ %% Output In ...
- 《DSP using MATLAB》Problem 6.11
代码: %% ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ %% Output In ...
- 《DSP using MATLAB》Problem 5.11
代码: %% ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ %% Output In ...
- 《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
说明:这两个小题的数学证明过程都不会,欢迎博友赐教. 直接上代码: %% +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ...
随机推荐
- es6模块 nodejs模块和 typescript模块
es6模块 import和export nodejs模块 require和module.exports typescript模块 module和export
- HTML表单格式化
HTML表单格式化 一.说明 用table布局 二.效果 三.代码 <!DOCTYPE html> <html> <head> <title>Form. ...
- jsp session/application
session的增加读取 session.setAttribute("username", "张三"); String u = (String) session ...
- 使用 Python 的 Socket 模块构建一个 UDP 扫描工具
译文:oschina 英文:bt3gl 当涉及到对一些目标网络的侦察时,出发点无疑是首先发现宿主主机.这个任务还可能包含嗅探和解析网络中数据包的能力. 几周前,我曾经谈到了如何使用Wireshark来 ...
- English trip -- 国际音标表
26个字母音标表 A a [ei] B b [bi:] C c [si:] D d [di:] E e [i:] F f [ef] G g [dʒi:] H h [eit∫] I i [ai] J j ...
- hdu多校(二) 1004 1007 1010
Game Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submis ...
- hihoCoder-1087 Hamiltonian Cycle (记忆化搜索)
描述 Given a directed graph containing n vertice (numbered from 1 to n) and m edges. Can you tell us h ...
- JavaScript运算符:递增递减运算符前置和后置的区别
从两段代码说起 var num1 = 2; var num2 = 20; var num3 = --num1 + num2; var num4 = num1 + num2; console.log(n ...
- JS常用操作方法图表
截取字符串方法 方法名 参数 返回值 例子 String.prototype.substr() (indexStart, length) 都可为负数,length为负数时自动转为0,length不传默 ...
- SQL基础用法(实例二)
/* 2006年10月01日 SQL Server 数据库的高级操作 (1) 批处理 (2) 变量 (3) 逻辑控制 (4) 视图 (5) 函数 (6) 高级查询 */ ()批处理 将多条SQL语句作 ...