Home > . > dnorm.m

dnorm

PURPOSE ^

DNORM The normal density function

SYNOPSIS ^

function f = dnorm(x,m,s)

DESCRIPTION ^

DNORM       The normal density function

         f = dnorm(x,Mean,StandardDeviation)

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function  f = dnorm(x,m,s)
0002 %DNORM       The normal density function
0003 %
0004 %         f = dnorm(x,Mean,StandardDeviation)
0005 
0006 %       Anders Holtsberg, 18-11-93
0007 %       Copyright (c) Anders Holtsberg
0008 
0009 if nargin<3, s=1; end
0010 if nargin<2, m=0; end
0011 f = exp(-0.5*((x-m)./s).^2)./(sqrt(2*pi)*s);

Generated on Fri 16-Jun-2006 09:09:06 by m2html © 2003