function d=q(z)
% FILE: Q.M
% CALL: d = q(z)
% This function returns the value of Q(z), using the erf(z) command to
% evaluate the Q(z) function.

% z is assumed to be a "scalar" or a vector.

z = z(:);
temp = length(z);
d = zeros(temp,1);

for (i = 1:temp)
  d(i) = 0.5*(1-erf((z(i)/sqrt(2))));
end;





