view m-toolbox/classes/+utils/@math/Normcdf.m @ 3:960fe1aa1c10 database-connection-manager

Add LTPDADatabaseConnectionManager implementation. Java code
author Daniele Nicolodi <nicolodi@science.unitn.it>
date Mon, 05 Dec 2011 16:20:06 +0100
parents f0afece42f48
children
line wrap: on
line source

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% Compute Normal cumulative distribution function
% 
% CALL 
% 
% p = Normcdf(x,mu,sigma);
% 
% 
% INPUT
% 
% - x, data
% - mu, distribution mean
% - sigma, distribution standard deviation
% 
%   References:
%      [1]  M. Abramowitz and I. A. Stegun, "Handbook of Mathematical
%      Functions", Government Printing Office, 1964, 26.2.
% 
%
% L Ferraioli 14-02-2011
%
% $Id: Normcdf.m,v 1.1 2011/02/14 16:08:25 luigi Exp $
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
function p = Normcdf(x,mu,sigma)

z = (x-mu)./sigma;
p = 0.5*erfc(-z./sqrt(2));


end