que_func.m

来自「《Radar Systems Analysis and Design Using」· M 代码 · 共 16 行

M
16
字号
function fofx = que_func(x)
% This function computes the value of the Q-function
% listed in Eq.(4.16). It uses the approximation in Eq.s (4.17) and (4.18)
if (x >= 0) 
   denom = 0.661 * x + 0.339 * sqrt(x^2 + 5.51);
   expo = exp(-x^2 /2.0);
   fofx = 1.0 - (1.0 / sqrt(2.0 * pi)) * (1.0 / denom) * expo;
else
   denom = 0.661 * x + 0.339 * sqrt(x^2 + 5.51);
   expo = exp(-x^2 /2.0);
   value = 1.0 - (1.0 / sqrt(2.0 * pi)) * (1.0 / denom) * expo;
   fofx = 1.0 - value;
end


   

⌨️ 快捷键说明

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