Compute probability density function values.
Syntax
p=pdf(dist,x,a)
p=pdf(dist,x,a,b)
Inputs
- dist
- The distribution name.
- x
- Values of the distribution random variable.
- a,b
- Distribution parameters.
Outputs
- d
- Probability density values.
Example
Vector example with normal distribution:
x = [1,2,3,4,5,6,7];
a = 5;
b = 3;
p = pdf('norm',x,a,b)
p = [Matrix] 1 x 7
0.05467 0.08066 0.10648 0.12579 0.13298 0.12579 0.10648
Comments
The supported strings for the distribution type are as follows. 'beta' 'chi2' 'chisquare' 'exp' 'exponential' 'f' 'gam' 'gamma' 'logn' 'lognormal' 'norm' 'normal' 'poiss' 'poisson' 't' 'unif' 'uniform' 'wbl' 'weibull'