examp28.m

来自「ADSP TOOLBOX: Version 2.0 and gui m-file」· M 代码 · 共 13 行

M
13
字号

clc,echo on 
%EXAMPLE 28 
x=[1 2 -1 0 2 3];h=2:-1:-3;             % 1 period of x and h 
y1=convp(x,h);                          % Periodic convolution (1 period) 
dtplot(0:length(y1)-1,y1,'o'),
axis([0 30 -70 30]),pause(2)            % Plot y1 
x5=[x x x x x];h5=[h h h h h];          % 5 periods of x and h 
y5=convp(x5,h5);                        % Periodic convolution (5 periods)
dtplot(0:length(y5)-1,y5,'o')           % Plot y5
scale=y5(1:length(y1))./y1              % Find ratio over 1 period  
echo off %end of example

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?