📄 rf_mod.m
字号:
function [f1 yf f1f r rf l]=rf_mod(y,wc)
N=20; %随机数点数20
td=0.1;
f0=3000;
wc=2e4*pi;
g=100;
t=linspace(0,td,length(y));
f1=y.*cos(wc*t); %射频调制发射
[f,yf]=T2F(t,y); %QPSK调制频域
[f,f1f]=T2F(t,f1); %射频调制频域
r=f1.*cos(wc*t); %射频解调
[f,rf]=T2F(t,r); %射频解调接收频域
[t,l]=lpf(f,rf,3*f0); %经过低通滤波
figure(5);
subplot(321);
plot(f,abs(yf),'LineWidth',1.5);
title('QPSK Modulation fdomain');
grid on; %QPSK调制频域图
subplot(322);
plot(t,f1,'LineWidth',1.5);
title('fc modulation transmmit');
grid on; %画射频调制发射图
subplot(323);
plot(f,abs(f1f),'LineWidth',1.5);
title('fc Modulation fdomain');
grid on; %画射频调制发射频域图
subplot(324);
plot(t,r,'LineWidth',1.5);
title('fc demodulation receive ');
grid on; %画射频解调接收图
subplot(325);
plot(f,abs(rf),'LineWidth',1.5);
title('fc demodulation recieve fdomain');
grid on; %画射频解调接收频域图
subplot(326);
plot(t,l,'LineWidth',1.5);
title('lowfliter ');grid on; %画经过低通滤波后的图
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -