% function y=Q(x)
%
% The statistical Q-function defined as:
%
%      Q(x) = 1/sqrt(2*pi) * integral from x to infinity of exp(-t^2) dt.
% 
% See also ERFC, ERFCX, ERFINV.

% A.Klein 3/20/98

function y=Q(x)

y=(1-erf(x/sqrt(2)))/2;