sigdemodulation.m

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

M
25
字号
%This function brings the Modulated signal on the base-band

%Input Parameters:-
%ModulatedSig: Modulated Signal Received
%IsInphase: TRUE/FALSE to tell that ModulatedSig is Inphase or Quadrature
%CarrierPhase: Phase of the Carrier

%Output Parameters:-
%DeModulatedSig: Base Band Siganl Recovered

function DeModulatedSig = SigDemodulation(ModulatedSig, 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 = -1 .* sin(2*pi*Fc*TimeInd);
end

%Carrier gain is set to twice, b/c after demudulation the gain 
%is set to half of the actual
DeModulatedSig = (2 .* Carrier) .* ModulatedSig;
%DeModulatedSig = (Carrier) .* ModulatedSig;

⌨️ 快捷键说明

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