fuhaojuanji.m
来自「经典《信号与系统》教程的matlab例程,对深入理解信号与系统相关概念有很大帮助」· M 代码 · 共 36 行
M
36 行
%求两个连续时间信号之间的卷积 程序名:fuhaojuanji.m
%
a=input('请选择激励信号e(t)[选择1--sin(t),2--exp(-t),3--exp(-t)*sin(6*t)]:');
b=input('请选择系统冲激响应函数h(t)[选择1--exp(-2*t),2--sin(t),3--exp(-t)*sin(6*t)]:');
syms t t0
if a==1
e='sin(t)';
end
if a==2
e='exp(-t)';
end
if a==3
e='exp(-t)*sin(6*t)';
end
if b==1
h='exp(-2*t)';
end
if b==2
h='sin(t)';
end
if b==3
h='exp(-t)*sin(6*t)';
end
e1=subs(e,t,t0)
h1=subs(h,t,t-t0)
r1=e1*h1
r=int(r1,t0,0,t)
subplot(3,1,1)
ezplot(e,[0,5])
subplot(3,1,2)
ezplot(h,[0,5])
subplot(3,1,3)
ezplot(r,[0,5])
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?