标题: 信号与系统实验 [打印本页]

作者: das    时间: 2015-4-18 04:24
标题: 信号与系统实验
      
t=0:2:4;
x=cos(0.5*pi*t);
plot(t,x)
hold on;
stem(t,x)
t=0:0.5:4;
x=cos(0.5*pi*t);
plot(t,x)
hold on;
stem(t,x)
wm=1;   %升余弦脉冲信号带宽
wc=wm;        %频率
Ts=pi/wm;        %周期
ws=2.4*pi/Ts;      %理想低通截止频率
n=-100:100;          %定义序列的长度是201
nTs=n*Ts        %采样点
f=sinc(nTs/pi);    %抽样信号
Dt=0.005;t=-20:Dt:20;
fa=f*Ts*wc/pi*sinc((wc/pi)*(ones(length(nTs),1)*t-nTs'*ones(1,length(t))));  %信号重建
t1=0:0.5:4;
f1=sinc(0.5*pi*t1);
subplot(211);
stem(t1,f1);
xlabel('t1');
ylabel('f(t)');
title('f(t)的临界采样信号');
subplot(212);
plot(t,fa)
xlabel('t');
ylabel('x(t)');
title('由f(t)的临界采样信号重构x(t)');
grid;

   







欢迎光临 (http://www.51hei.com/bbs/) Powered by Discuz! X3.1