Stixbox Function
Last update : 21/4/2006
dnorm - The normal density function
Calling Sequence
- y = dnorm(x [,m,s])
Parameters
-
x : real vector or matrix
-
m : mean (default value is zeros(x)). m is a scalar or a matrix with the same size as x.
-
s : standard deviation (default value is ones(x)). s is a scalar or a matrix with the same size as x.
-
y : normal density function with mean m and standard deviation s, at the values of x :
Description
The normal density function.
y=exp(-0.5*((x-m)./s)^2)./(sqrt(2*pi).*s)
Examples
x = -5:0.1:5 ;
y = dnorm(x);
plot(x,y);