(1)典型连续信号的上机实现
实指数的实现:
t=-2:0.0001:2;
xt1=2*exp(2*t);
plot(t,xt1)
xlabel('t')
ylabel('x(t)')
title('实指数信号')
(2)连续时间信号基本运算的实现
t=-2:0.0001:2;
xt=2*exp(2*t);
figure
subplot(221)
plot(t,xt)
grid on
title('x(t)');
subplot(222)
plot(-t,xt)
grid on
title('x(-t)');
subplot(223);
plot(-t+3,xt)
grid on
title('x(-t+3)');
subplot(224);
plot(0.5*(-t+3),xt)
grid on
title('x(-2t+3)');
(3)求如下系统的冲激响应和阶跃响应
a=[7,4,6];
b=[1,1];
subplot(211)
impulse(b,a);
subplot(212)
step(b,a)
(4)求如下卷积
t=-1:0.01:5;
f1=exp(-t).*(t>0)
f2=exp(-t).*(t>0)
f3=conv(f1,f2);f3=f3*0.01;
k=2*length(t)-1;
k3=linspace(2*t(1),2*t(end),k);
subplot(2,2,1)
plot(t,f1);
title('f1(t)')
xlabel('t')
ylabel('f1(t)')
subplot(2,2,2)
plot(t,f2)
title('f2(t)')
xlabel('t')
ylabel('f2(t)')
subplot(2,2,3)
plot(k3,f3);
h=get(gca,'position');
h(3)=2.5*h(3);
set(gca,'position',h);
title('f(t)=f1(t)*f2(t)');
xlabel('t');
ylabel('f(t)');