estimationerror.m
来自「这是一个关于完成QAM调制的Matlab示例程序」· M 代码 · 共 27 行
M
27 行
function [rxMsg] = EstimationError(idealRxMsg,phaseError,dopplerError)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% function [rxMsg] = Channel(modMsg,gammaBar)
% This function models the receiver channel estimation errors. As such, it will
% take idealRxMsg, and apply the various error effects.
%
% idealRxMsg = baseband received message before error simulation
% phaseError = amount of phase error to be applied, in radians. Can
% be any real value.
% dopplerError = doppler error per sample, in cycles per sample
% rxMsg = received message with estimation error effects applied
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
if ((phaseError == 0) & (dopplerError == 0))
rxMsg = idealRxMsg;
else
if (phaseError ~=0)
rxMsg = idealRxMsg * exp(j*phaseError);
end
if (dopplerError ~=0)
rxMsg = idealRxMsg.*exp(j*2*pi*dopplerError*((1:length(idealRxMsg))-1));
end
end
return
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?