代码:

x1 = [1,2,2]; x2 = [1,2,3,4]; y1 = circonvt(x1,x2,5);            % N = 5

n1 = 0:1:length(x1)-1;
n2 = 0:1:length(x2)-1; ny1 = 0:1:length(y1)-1; %% -----------------------------------------------------------------
%% START a
%% -----------------------------------------------------------------
figure('NumberTitle', 'off', 'Name', 'Exameple5.15a ')
set(gcf,'Color','white');
subplot(3,1,1); stem(n1,x1); title('sequence x1(n)'); axis([0,5,0,5]);
xlabel('n'); ylabel('x1(n)'); grid on;
subplot(3,1,2); stem(n2,x2); title('sequence x2(n)'); axis([0,5,0,5]);
xlabel('n'); ylabel('x2(n)'); grid on;
subplot(3,1,3); stem(ny1,y1); title('Circularly convolution sequence y1(n)'); axis([0,5,0,20]);
xlabel('n'); ylabel('y1(n)'); grid on; %% -----------------------------------------------------------------
%% END a
%% ----------------------------------------------------------------- y2 = circonvt(x1,x2,6); % N = 6 ny2 = 0:1:length(y2)-1; %% -----------------------------------------------------------------
%% START b
%% -----------------------------------------------------------------
figure('NumberTitle', 'off', 'Name', 'Exameple5.15b ')
set(gcf,'Color','white');
subplot(3,1,1); stem(n1,x1); title('sequence x1(n)'); axis([0,5,0,5]);
xlabel('n'); ylabel('x1(n)'); grid on;
subplot(3,1,2); stem(n2,x2); title('sequence x2(n)'); axis([0,5,0,5]);
xlabel('n'); ylabel('x2(n)'); grid on;
subplot(3,1,3); stem(ny2,y2); title('Circularly convolution sequence y2(n)'); axis([0,5,0,20]);
xlabel('n'); ylabel('y2(n)'); grid on; %% -----------------------------------------------------------------
%% END b
%% -----------------------------------------------------------------

  结果:

《DSP using MATLAB》示例Example5.15的更多相关文章

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

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

  3. DSP using MATLAB 示例 Example3.19

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

  4. DSP using MATLAB示例Example3.18

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

  5. DSP using MATLAB 示例 Example3.11

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

  6. DSP using MATLAB 示例Example3.9

    用到的性质 上代码: n = 0:100; x = cos(pi*n/2); k = -100:100; w = (pi/100)*k; % freqency between -pi and +pi ...

  7. DSP using MATLAB 示例Example3.8

    代码: x = rand(1,11); n = 0:10; k = 0:500; w = (pi/500)*k; % [0,pi] axis divided into 501 points. X = ...

  8. DSP using MATLAB 示例Example3.7

    上代码: x1 = rand(1,11); x2 = rand(1,11); n = 0:10; alpha = 2; beta = 3; k = 0:500; w = (pi/500)*k; % [ ...

  9. DSP using MATLAB示例Example3.6

    代码: n = [-5:5]; x = (-0.9).^n; % x(n) = k = -200:200; w = (pi/100)*k; % [0,pi] axis divided into 101 ...

随机推荐

  1. miniui后台无法接收到input传值

    出错原因:在miniui中,此处应写成<input textName="current_unit",在php中才可以使用$_POST['current_unit']获取到值, ...

  2. 30秒懂SQL中的join(2幅图+30秒)

    废话不多说,直接上图秒懂. t1表的结构与数据如下: t2表的结构与数据如下: inner join select * from t1 inner join t2 on t1.id = t2.id; ...

  3. <<< 将一个rar格式的文件变成一张jpg图片,按照后缀来选择打开他的模式

    把一个压缩格式和一张图片合成,按照后缀来判断他打开是图片还是解压文件,后缀是jpg打开的就是一张图片,后缀是rar打开的就是一个压缩包,里面存放你放的东西   :例如(秘密) 准备一张图片,test. ...

  4. 出现could not find developer disk image解决办法和不受信任的开发者

    真机测试问题 最近一直遇到这样的问题,很是让人心烦,但是还是要自己解决的,我也是从网上查了很多这样的解决办法,都没有成功,所以今天我要把自己的总结的方法和大家分享一下. iOS测试当中的问题 iOS ...

  5. context元素大概解说

    Context元素代表一个web应用,运行在某个特定的虚拟主机上.如Servlet Specification 2.2或以后版本中描述的那样,每个web应用基于一个Web Application Ar ...

  6. Error: Collection was modified; enumeration operation may not execute.

    http://blog.csdn.net/ffeiffei/article/details/6131254

  7. PerfMon.exe通过命令管理计数器

    通过PerfMon命令可以管理计数器,添加删除调整等等. 例1:Logman:在本地和远程系统上,管理和调度性能计数器和事件跟踪日志. master..xp_cmdshell 'logman quer ...

  8. MSYS2的源配置

    关于MSYS2的文章可以参考下面的链接,笔者不多赘述: msys2安装笔记 MSYS2 + MinGW-w64 + Git + gVim 环境配置 msys2环境搭建 msys2安装g++: pacm ...

  9. can't debug windows service in win7 64bit

    if encount below error: Solution: run the command “vsdiag_regwcf.exe -i” as admin in C:\Program File ...

  10. Eclipse 设置SVN忽略文件

    1.在 Eclipse 中点击菜单 window --> Preferences --> Team --> Ignored Resources 2.在Eclipse的导航视图中,选中 ...