2022 04月10日
作者: 小白哥
  • 浏览: 550
  • 收藏:0
  • 点赞:1
MATLAB卷积

1.示例

1.jpg

%第一题
clear;clc
t1=-0.5:0.01:2.5;
t2=-1:0.01:5;
f1=stepfun(t1,0)-stepfun(t1,2);
f2=0.5.*t1.*(stepfun(t1,0)-stepfun(t1,2));
f3=conv(f1,f2);
figure(1)
subplot(3,1,1)
plot(t1,f1)
title('f1')
subplot(3,1,2)
plot(t1,f2)
title('f2')
subplot(3,1,3)
plot(t2,f3*0.01)
title('f1卷积f2')

1.jpg

%第二题
f=exp(-3.*t1).*sin(8.*t1).*stepfun(t1,0);
h=exp(-2.*t1).*stepfun(t1,0);
f3=conv(f,h);
figure(2)
subplot(3,1,1)
plot(t1,f)
title('f')
subplot(3,1,2)
plot(t1,h)
title('h')
subplot(3,1,3)
plot(t2,f3*0.01)
title('零状态响应')

1.jpg

2.jpg

%第三题
t1=-2:0.01:2;
f1=stepfun(t1,0)-stepfun(t1,1);
f2=2*(stepfun(t1,0)-stepfun(t1,1));
f=conv(f1,f2);
figure(3)
subplot(3,1,1)
plot(t1,f1)
title('f1')
subplot(3,1,2)
plot(t1,f2)
title('f2')
t2=-4:0.01:4;
subplot(3,1,3)
plot(t2,f*0.01)
title('f')

1.jpg


  

发表评论

评论列表


没有评论

筛选

文章分类

热门文章

企业招聘网址

2023-12-07  浏览:3049次

BC1.2协议介绍

2023-06-14  浏览:2949次

USB2.0速度识别

2023-10-23  浏览:1372次