DSP using MATLAB 示例Example2.12

代码:
b = [1]; a = [1, -0.9]; n = [-5:50];
h = impz(b,a,n); set(gcf,'Color','white');
%subplot(2,1,1);
stem(n,h); title('Impulse Response');
xlabel('n'); ylabel('h(n)'); grid on; x = stepseq(0, -5, 50) - stepseq(10, -5, 50)
y = filter(b, a, x);
figure; set(gcf,'Color','white');
%subplot(2, 1,2);
stem(n,x); title('Step Sequence');
xlabel('n'); ylabel('x(n)'); grid on; figure; set(gcf,'Color','white');
%subplot(2, 1,2);
stem(n,y); title('Output Sequence');
xlabel('n'); ylabel('y(n)'); axis([-5,50,-0.5,8]);
grid on;
结果:


DSP using MATLAB 示例Example2.12的更多相关文章
- DSP using MATLAB 示例 Example3.12
用到的性质 代码: n = -5:10; x = sin(pi*n/2); k = -100:100; w = (pi/100)*k; % freqency between -pi and +pi , ...
- 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 示例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 示例Example2.4
n = [0:10]; x = stepseq(0,0,10) - stepseq(10,0,10); [xe,xo,m] = evenodd(x,n); set(gcf,'Color',[1,1,1 ...
- DSP using MATLAB 示例Example2.3
n = [-10:1:10]; alpha = -0.1+0.3j; % x = exp(alpha*n); % subplot(2,1,1); set(gcf,'Color',[1,1,1]) % ...
- DSP using Matlab 示例Example2.2
a. n = -2:10; x = [1:7,6:-1:1]; % generate x(n) [x11,n11] = sigshift(x,n,5); [x12,n12] = sigshift(x, ...
- 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 ...
随机推荐
- HTML5基本标签、样式
感觉在Sublime Text3中写起来比较方便~~ 将HTML5中要用到的基本标签全部放在了一起,没有好好的整理,为了自己记忆的方便,就先这样写下来了~~ <!DOCTYPE html> ...
- 细谈CSS布局方式
一.CSS布局方式分类 [1].默认文档流方式:以默认的html元素的结构顺序显示 [2].浮动布局方式:通过设置html的float属性显示,值:none不浮动.left对象向左浮动,而后面的内容流 ...
- JS返回上一页
<button onclick="javascript:history.go(-1);">返回上一页</button> <button oncli ...
- cf378D(stl模拟)
题目链接:http://codeforces.com/contest/733/problem/D 用map<pair<int, int>int>标记(第一次用~)... 代码: ...
- 与你相遇好幸运,Sail.js定义其他主键
uuid : { type: 'string', unique: true, required: true, primaryKey: true },
- Android Matrix
转自 :http://www.cnblogs.com/qiengo/archive/2012/06/30/2570874.html#code Matrix的数学原理 平移变换 旋转变换 缩放变换 错切 ...
- Gradle使用指南
Gradle Plugin User Guide - Android Studio Project Sitehttp://tools.android.com/tech-docs/new-build-s ...
- Tkprof工具详解一
注明:一些文章是从别人的博客中转载过来的,方便自己以后查阅:在数据库生成的oracle trace文件中,可读性是比较差的,此时可使用tkprof工具来格式化trace文件,tkprof是一个命令 ...
- html5 web database
html5 web database <!DOCTYPE html> <html lang="en"> <head> <meta char ...
- hdu 2232 矩阵 ***
一天四个不同的机器人a.b.c和d在一张跳舞毯上跳舞,这是一张特殊的跳舞毯,他由4个正方形毯子组成一个大的正方形毯子,一开始四个机器人分别站在4 块毯子上,舞蹈的每一步机器人可以往临近(两个毯子拥有同 ...