📄 ccovdemo1.m
字号:
%==========================================================================
% Name:ccovdemo1
% The program demonstrate the convolution operation of two continuou-time signals
% please expressed the signals in terms of the unit step function.
% for example:e(t)=exp(-2*t).*u(t).
%==========================================================================
clear;close all;
t0=-4;%input('请输入信号的起始时间(建议取0—-10):');
t1=4;%input('请输入信号的终止时间(建议取0—10):');
p=.01;
t=t0:p:t1;
x=u(t)-u(t-1);%input('请输入激励信号:');
h=t.*(u(t)-u(t-2));%input('请输入系统冲激响应:');
f=p*conv(x,h);%卷积计算
f1=p*conv(fliplr(x),fliplr(h));
subplot(221)
plot(t,x)
subplot(222)
plot(t,h)
subplot(212)
t = 2*t0:p:2*t1;
plot(t,f)
hold on
plot(t,f1,'r')
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -