examp22.m

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

M
13
字号

clc,echo on 
%EXAMPLE 22 
ts=0.01;                      % Choose sampling interval (time step)
tx=-1:ts:1;                   % Choose a time axis for signal x
th=0:ts:2;                    % Time axis for signal h
x=3*cos(pi*tx/2);             % Generate the signal x
h=2*tri(th-1);                % Generate the signal h
y=convnum(x,h,ts);            % Compute the convolution y
ty=-1:ts:3;                   % Create a time axis for y
plot(tx, x, th, h, ty, y);    % Overplot x, h and y
echo off %end of example

⌨️ 快捷键说明

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