连续时间信号的表示、连续时间LTI系统的时域分析

连续时间信号的表示LTI系统的时域分析

例一:
在这里插入图片描述代码如下:
首先构建阶跃函数:

function  f=u(t)
f=(t>=0);
end

试题代码:

t=-10:0.01:10;
y1=2*exp(-1.5.*t).*u(t);
y2=2*sin(2*pi*t+pi/4);
y3=2*(u(t)-u(t-1));
subplot(2,2,2),plot(t,y1,'r'),axis([-2 4 0 3]),xlabel('t'),ylabel('y=2exp(-1.5t)*u(t)'),grid on
subplot(2,2,3),plot(t,y2),axis([-2*pi 2*pi -2 2]),xlabel('t'),ylabel('y=2sin(2pi*t+pi/4'),grid on
subplot(2,2,4),plot(t,y3),axis([-1 2 -1 3]),xlabel('t'),title('分段函数'),grid on

例二:
在这里插入图片描述代码如下:
阶跃函数:

function f=funct(t)
f=u(t+2)-u(t)+(-t+1).*(u(t)-u(t-1));
end

原函数:

function f=funct(t)
f=u(t+2)-u(t)+(-t+1).*(u(t)-u(t-1));
end

试题代码:

t=-10:0.001:10;
subplot(2,3,1),plot(t,funct(t)),xlabel('t'),ylabel('y1'),axis([-4 4 0 1]),title('原函数'),grid on
subplot(2,3,2),plot(t,funct(t-2)),xlabel('t1'),ylabel('y1'),axis([-2 4 0 1]),title('y=f(t-2)'),grid on
subplot(2,3,3),plot(t,funct(3*t)),xlabel('t2'),ylabel('y1'),axis([-2 2 0 1]),title('y=f(3t)'),grid on
subplot(2,3,4),plot(t,funct(-t)),xlabel('t3'),ylabel('y1'),axis([-2 3 0 1]),title('y=f(-t)'),grid on
subplot(2,3,5),plot(t,funct(-3*t-2)),xlabel('t4'),ylabel('y1'),axis([-2 1 0 1]),title('y=f(-3t-2)'),grid on

例题三:
在这里插入图片描述代码如下:

t=[0:0.1:5];
a=[1 4 4];
b=[1 3];
x=exp(-t).*stepfun(t,0);
y1=impulse(b,a,t);
y2=lsim(b,a,x,t);
subplot(2,2,1),plot(t,y1,'-r*'),xlabel('t'),ylabel('h(t)'),title('冲激响应'),grid on,legend('impulse h(t)')
subplot(2,2,2),plot(t,y2),xlabel('t'),ylabel('yf(t)'),title('零状态响应'),grid on,legend('lism yf(t))')

例题四:
在这里插入图片描述代码如下:

dt=0.01; t=-3:dt:3;
f1=2*(heaviside(t+1)-heaviside(t-1));
f2=heaviside(t+2)-heaviside(t-2);
f=conv(f1,f2)*dt; 
n=length(f); 
tt=(0:n-1)*dt-2;
subplot(221),plot(t,f1),grid on;
axis([-3,3,-0.2,1.2]);
title('f1(t)');
xlabel('t')
subplot(222);
plot(t,f2); 
grid on;
axis([-3,3,-0.2,1.2]);
title('f2(t)'); 
xlabel('t')
 subplot(212);
plot(tt,f);
grid on;
title('f(t)=f1(t)*f2(t)'); 
xlabel('t')
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

神马都会亿点点的毛毛张

你的鼓励将是我创作的最大动力!

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值