function f = N(x) %% Function returns the unit normal cdf evaluated at all the points %% in x. Computes normal cdf by transformation of erf function. %% %% Ken Gosier %% May 2002 f = 0.5 + 0.5*erf(x/sqrt(2));