zoukankan      html  css  js  c++  java
  • 《DSP using MATLAB》示例Example5.15

    代码:

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

      结果:

    牢记: 1、如果你决定做某事,那就动手去做;不要受任何人、任何事的干扰。2、这个世界并不完美,但依然值得我们去为之奋斗。
  • 相关阅读:
    SBIT
    Linux 系统中进程5中常见状态
    centos yum command
    About DNS
    【从零开始学BPM,Day1】工作流管理平台架构学习
    打破陈规抓痛点,H3 BPM10.0挑战不可能
    H3 BPM让天下没有难用的流程之产品概述
    《中国BPM品牌竞争力指数》完整版
    H3 BPM的品牌制胜之道
    《中国BPM品牌竞争力指数》报告出炉,H3 BPM持续领跑
  • 原文地址:https://www.cnblogs.com/ky027wh-sx/p/6159017.html
Copyright © 2011-2022 走看看