| Statistics Toolbox | Search  Help Desk |
| normpdf | Examples |
Normal probability density function (pdf).
Syntax
Y = normpdf(X,MU,SIGMA)
Description
normpdf(X,MU,SIGMA) computes the normal pdf with parameters mu and SIGMA at the values in X. The arguments X, MU and SIGMA must all be the same size except that scalar arguments function as constant matrices of the common size of the other arguments. The parameter SIGMA must be positive. The normal pdf is:
= 1.
If x is standard normal, then x
+ µ is also normal with mean µ and standard deviation
. Conversely, if y is normal with mean µ and standard deviation
, then x = (y -µ)/
is standard normal.
Examples
mu = [0:0.1:2];
[y i] = max(normpdf(1.5,mu,1));
MLE = mu(i)
MLE =
1.5000