📄 carrier_mod.m
字号:
function [y3,y4,y]=carrier_mod(f0,out1,out2)
N=20; %随机数点数20
td=0.1;
f0=3000;
wc=2e4*pi;
g=100; %一个矩形电平采样点
t=linspace(0,td,length(out1));
y3=(-1)*sin(2*f0*pi*t).*out1; %I通道调制
y4=cos(2*f0*pi*t).*out2; %Q通道调制
y=y3+y4; %QPSK调制
figure(4);
subplot(311);
t=linspace(0,td,length(out1));
plot(t,y3,'LineWidth',1.5);grid on;
title('I Channel Modulation');
axis([0 td -1.5 1.5]); %画I通道调制图
subplot(312);
plot(t,y4,'LineWidth',1.5);grid on;
title('Q Channel Modulation');
axis([0 td -1.5 1.5]); %画Q通道调制图
subplot(313);
plot(t,y,'LineWidth',1.5);grid on;
title('QPSK Modulation');
axis([0 td -1.5 1.5]); %画QPSK调制图
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -