📄 carrier_modulation.m
字号:
% In ampliture-modulated PAM system, the transmitter filter with impulse
% response has a square-root raised-cosine spectral, with a roll-off 0.5.
%Carrier frequency is fc=40/T.
echo off
T=1;
delta_T=T/200;
alpha=0.5;
fc=40/T;
A_m=1;
t=-5*T+delta_T:delta_T:5*T;
N=length(t);
for i=1:N
if (abs(t(i))~=T/(2*alpha))
g_T(i)=sinc(t(i)/T)*(cos(pi*alpha*t(i)/T)/(1-4*alpha^2*t(i)^2/T^2));
else
g_T(i)=0;
end
echo off;
end;
echo off;
G_T=abs(fft(g_T));
u_m=A_m*g_T.*cos(2*pi*fc*t);
U_m=abs(fft(u_m));
f=-0.5/delta_T:1/(delta_T*(N-1)):0.5/delta_T;
figure(1);
plot(f,fftshift(G_T),'linewidth',2);
axis([-1/T 1/T 0 max(G_T)]);
figure (2);
plot(f,fftshift(U_m),'r','linewidth',2);
axis([-50 50 0 110]);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -