代码:

x1 = [2, 3, 4]; x2 = [3, 4, 5, 6];            % x1 x2 sequences
% n1 = 0:1:2; n2 = 0:1:3;
n1 = 0:1:length(x1)-1; n2 = 0:1:length(x2)-1; [x3, n3] = conv_m(x1, n1, x2, n2); figure('NumberTitle', 'off', 'Name', 'Example4.4 x1 & x2 sequence')
set(gcf,'Color','white');
subplot(2,1,1); stem(n1,x1); title('x1 sequence '); xlabel('n'); ylabel('x1(n)'); grid on;
subplot(2,1,2); stem(n2,x2); title('x2 sequence '); xlabel('n'); ylabel('x2(n)'); grid on; figure('NumberTitle', 'off', 'Name', 'Example4.4 x3 sequence')
set(gcf,'Color','white');
stem(n3,x3); title('x3 sequence'); xlabel('n'); ylabel('x3(n)'); grid on;

  运行结果:

《DSP using MATLAB》示例Example4.4的更多相关文章

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

  2. DSP using MATLAB 示例 Example3.19

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

  3. DSP using MATLAB示例Example3.18

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

  4. DSP using MATLAB 示例Example3.23

    代码: % Discrete-time Signal x1(n) : Ts = 0.0002 Ts = 0.0002; n = -25:1:25; nTs = n*Ts; x1 = exp(-1000 ...

  5. DSP using MATLAB 示例Example3.22

    代码: % Discrete-time Signal x2(n) Ts = 0.001; n = -5:1:5; nTs = n*Ts; Fs = 1/Ts; x = exp(-1000*abs(nT ...

  6. DSP using MATLAB 示例Example3.17

  7. DSP using MATLAB示例Example3.16

    代码: b = [0.0181, 0.0543, 0.0543, 0.0181]; % filter coefficient array b a = [1.0000, -1.7600, 1.1829, ...

  8. DSP using MATLAB 示例 Example3.15

    上代码: subplot(1,1,1); b = 1; a = [1, -0.8]; n = [0:100]; x = cos(0.05*pi*n); y = filter(b,a,x); figur ...

  9. DSP using MATLAB 示例 Example3.13

    上代码: w = [0:1:500]*pi/500; % freqency between 0 and +pi, [0,pi] axis divided into 501 points. H = ex ...

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

随机推荐

  1. 【leetcode】Gray Code (middle)

    The gray code is a binary numeral system where two successive values differ in only one bit. Given a ...

  2. IOS-Social.framework

    1.使用前 需要导入Social.framework 框架 2.实例代码(新浪微博为例) - (IBAction)shejiaoBtn {        // 判断服务器是否可用    if ([SL ...

  3. eclipse上安装abator插件

    下面是我看了网上的有一点需要强调:网址 http://ibatis.apache.org/tools/abator然后全选,然后是==>重启就好了 eclipse上安装abator插件参考:ht ...

  4. nfs server的配置 Starting NFS daemon: [FAILED]

    总结了一下是nfs server的制作过程:nfs(Network File System)其实就是说,这个机器的硬盘不够了,我要把文件放到别的服务器上去,服务器端的配置如下:首先(1)确保你的机器上 ...

  5. 高效使用你的Xcode

    (via:VongLo's Dev Space  原文:Supercharging Your Xcode Efficiency)   好莱坞电影里经常看到黑客们手指在键盘上飞速跳跃,同时终端上的代码也 ...

  6. 开启后台 Service 闪退

    04-29 15:36:23.395: E/ActivityThread(15275): Performing stop of activity that is not resumed: {com.e ...

  7. auto(c++11)

    C++primer 第五版,第三章出现了此段程序,求解读附源码:代码1:#include<iostream>#include<string>using namespace st ...

  8. DBCC常用命令小汇

    DBCC是SQL Server提供的一组控制台命令,功能很强大,掌握一些必要的语句,对操作数据库有不少帮助,所以决定整理一下,发现已有不少类似的整理,减少了不少工作,归类如下: 一.DBCC 帮助类命 ...

  9. .net学习笔记----有序集合SortedList、SortedList<TKey,TValue>、SortedDictionary<TKey,TValue>

    无论是常用的List<T>.Hashtable还是ListDictionary<TKey,TValue>,在保存值的时候都是无序的,而今天要介绍的集合类SortedList和S ...

  10. Jquery.Datatables 服务器处理(Server-side processing)

    看了看介绍 http://datatables.club/manual/server-side.html 没有经过处理的分页,先显示出来看看效果,就这样写(存储过程自己写) cshtml " ...