www.pudn.com > MATLAB.rar > exa090300_2.m


>-----------------------------------------------------------------------------
> exa090300_2.m, for fig. 9.3.2,
>-----------------------------------------------------------------------------
clear all;

t0=.1;
ts=.001;
fc=250;
t=[-t0/2:ts:t0/2];
m=sinc(100*t);
c=cos(2*pi*fc*t);

>得到幅度调制信号;
u=m.*c;
f=-0.5:1/256:0.5-1/256;
M=fft(m,256);
U=fft(u,256);

> 画出调制信号和其对应的解析信号的频谱;
subplot(322)
plot(f,abs(fftshift(M)));grid;
U=abs(U);
for i=1:256/2
U(i)=2*U(i);
U(i+128)=0;
end
subplot(321)
plot(f,fftshift(U));grid;