📄 sigdemodulation.m
字号:
%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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -