上代码:

b = [1]; a = [1, -1, 0.9]; n = [-20:120];
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,-20, 120); s = 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,s); title('Step Response');
xlabel('n'); ylabel('s(n)'); grid on;

结果:

  

DSP using MATLAB 示例Example2.11的更多相关文章

  1. 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 ...

  2. DSP using MATLAB 示例 Example3.11

    用到的性质 上代码: n = -5:10; x = rand(1,length(n)); k = -100:100; w = (pi/100)*k; % freqency between -pi an ...

  3. 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); ...

  4. 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 ...

  5. 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]) % ...

  6. 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, ...

  7. 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 ...

  8. DSP using MATLAB 示例 Example3.19

    代码: % Analog Signal Dt = 0.00005; t = -0.005:Dt:0.005; xa = exp(-1000*abs(t)); % Discrete-time Signa ...

  9. DSP using MATLAB示例Example3.18

    代码: % Analog Signal Dt = 0.00005; t = -0.005:Dt:0.005; xa = exp(-1000*abs(t)); % Continuous-time Fou ...

随机推荐

  1. SuSE Linux 开启VNC服务

    一.启动VNC服务输入命令 vncserver  二.编辑启动脚步vi /root/.vnc/xstartup 把twm &注释改为#twm & 然后再最下面增加2行startgnom ...

  2. 【leetcode】Isomorphic Strings(easy)

    Given two strings s and t, determine if they are isomorphic. Two strings are isomorphic if the chara ...

  3. 如何让Table中的第一列和第二列的值相乘然后赋值给第三列

    因为需求的原因所以这样做,不废话了,直接上代码,我用的GridView绑定的数据,table也一样,因为GridView通过浏览器编译后的代码就是table.下面是aspx页面的Html代码: < ...

  4. UISearchController Attempting to load the view of a view controller while it is deallocating is not allowed and may result in undefined behavior

    Attempting to load the view of a view controller while it is deallocating is not allowed and may res ...

  5. October 12th 2016 Week 42nd Wednesday

    Passion is momentary; love is enduring. 激情短暂,真爱长久. What is love? And what is real love? We are alway ...

  6. 当一个页面出现多个checkbox全选时的处理

    HTML: <input type="checkbox" onclick="boxOnclick(this,'some1')">全选一 <in ...

  7. Android Service 与 Thread 的区别

    Ref:http://blog.csdn.net/jiangwei0910410003/article/details/17008687 1). Thread:Thread 是程序执行的最小单元,它是 ...

  8. maximum subarray problem

    In computer science, the maximum subarray problem is the task of finding the contiguous subarray wit ...

  9. 【转】C语言快速幂取模算法小结

    (转自:http://www.jb51.net/article/54947.htm) 本文实例汇总了C语言实现的快速幂取模算法,是比较常见的算法.分享给大家供大家参考之用.具体如下: 首先,所谓的快速 ...

  10. php上传文件进度条

    ps:本文转自脚本之家 Web应用中常需要提供文件上传的功能.典型的场景包括用户头像上传.相册图片上传等.当需要上传的文件比较大的时候,提供一个显示上传进度的进度条就很有必要了. 在PHP 5.4以前 ...