当前位置 博文首页 > 仇天朔 廊坊师范学院信息技术提高班 十七期:基于MATLAB的低通信
(1)熟悉低通信号抽样定现常的要点。
(2)掌握使用MATAB;调制仿真的要点。
设计源程序代码。
(1)根据低通信号抽样定理,给定信号的低通信号抽样波形。
(2)通过MATAB软件仿真给
(3)对比给定信号的理论调制波形和仿真调制波形。
1.低通抽样定理
一频带限制在(0.f)内的时间连续信号m(t),若以f≥2f速率对m(t)等间隔T= 1/f.≤1/2f抽样,则m(t) 将被所得抽样函数m(t)完全确定。
clc;
clear;
n1=input('请输入采样点数n:');
n=0:n1;
zb=size(n);
figure
sinf=sin(100*pi*n/(10*zb(2)))+cos(200*pi*n/(10*zb(2)));
subplot(211);
stem(n,sinf,'.');
xlabel('n');
ylabel('x(n)');
title('采样后的时域信号y=x(n)');
w=0:(pi/100):4*pi;
subplot(212)
plot(w,fft1(w,sinf,n));
xlabel('w');
ylabel('x(w)');
title('采样后的频域信号y=FT(sin(100*pi*n)+cos(200*pi*n))');
grid
[B,A]=butter(8,350/500);
[H,w]=freqz(B,A,512,2000);
figure;
plot(w*2000/(2*pi),abs(H));
xlabel('Hz');
ylabel('频率响应幅度');
grid on
figure
y=filter(B,A,sinf);
subplot(1,1,1);
plot(y);
t=zeros(1,10000);
y=sin(100*pi*t)+cos(200*pi*t);
xlabel('t');
ylabel('x(t)');
title('恢复后的连续信号y=sin(100*pit)+cos(200*pi*t)');
grid on
function result=fft1(w,hanshu,n)
a=cell(1,length(w));
for i=1:length(w)
m=hanshu.*((exp(-j*(i-1)*pi/100)).^n);
a{i}=sum(m);
end
for i=1:length(w)
result(i)=a{i};
End