sigmodulation.m

来自「APSK仿真程序」· M 代码 · 共 24 行

M
24
字号
%This function modulate the carrier according to the input signal

%Input Parameters:-
%BaseBandSignal: Signal to be modulated on the carrier
%IsInphase: TRUE/FALSE to tell that the BaseBandSignal will be
%           modulated on the Inphase or the Quadrature carrier.
%CarrierPhase: Phase of the Carrier

%Output Parameters:-
%ModulatedSig: Modulated Siganl for the input BaseBandSignal

function ModulatedSig = SigModulation(BaseBandSignal, IsInphase, CarrierPhase)
%Paramters Initialization
Parameter;

TimeInd = CarrierPhase : 1/SamplingRate : CarrierPhase + SymbolsPerFrame * Ts - 1/SamplingRate;

if IsInphase == TRUE
    Carrier = cos(2*pi*Fc*TimeInd);
else
    Carrier = sin(2*pi*Fc*TimeInd);
end

ModulatedSig = Carrier .* BaseBandSignal;

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?