Home > atmlab > math > cdf_normal.m

cdf_normal

PURPOSE ^

CDF_NORMAL Normal cumulative distribution function (cdf).

SYNOPSIS ^

function c = cdf_normal(x,varargin)

DESCRIPTION ^

 CDF_NORMAL   Normal cumulative distribution function (cdf).

    Returns the cumulative distribution function for a normal distribution.

    The function *normcdf* in the statistics toolbox performs the same
    calculations.

 FORMAT   c = cdf_normal( x [, xm, si ] )
        
 OUT   c   Cumulative distrubution function.
 IN    x   Data values.
 OPT   xm  Mean value. Default is 0.
       si  Standard deviation. Default is 1.

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

DOWNLOAD ^

cdf_normal.m

SOURCE CODE ^

0001 % CDF_NORMAL   Normal cumulative distribution function (cdf).
0002 %
0003 %    Returns the cumulative distribution function for a normal distribution.
0004 %
0005 %    The function *normcdf* in the statistics toolbox performs the same
0006 %    calculations.
0007 %
0008 % FORMAT   c = cdf_normal( x [, xm, si ] )
0009 %
0010 % OUT   c   Cumulative distrubution function.
0011 % IN    x   Data values.
0012 % OPT   xm  Mean value. Default is 0.
0013 %       si  Standard deviation. Default is 1.
0014 
0015 % 2005-05-21   Created by Patrick Eriksson.
0016 
0017 
0018 function c = cdf_normal(x,varargin)
0019 %
0020 [xm,si] = optargs( varargin, { 0, 1 } );
0021 
0022 
0023 c = erf( (x-xm)/sqrt(2)/si )/2 + 0.5;

Generated on Mon 15-Sep-2014 13:31:28 by m2html © 2005