Statistics Toolbox | ![]() ![]() |
Probability density function (pdf) for a specified distribution
Syntax
Description
pdf('name',X,A1,A2,A3)
returns a matrix of densities, where 'name' is a string containing the name of the distribution. X is a matrix of values, and A1, A2, and A3 are matrices of distribution parameters. Depending on the distribution, some of the parameters may not be necessary.
Vector or matrix inputs for X, A1, A2, and A3 must all have the same size. A scalar input is expanded to a constant matrix with the same dimensions as the other inputs.
pdf is a utility routine allowing access to all the pdfs in the Statistics Toolbox using the name of the distribution as a parameter. See Overview of the Distributions for the list of available distributions.
Examples
p = pdf('Normal',-2:2,0,1) p = 0.0540 0.2420 0.3989 0.2420 0.0540 p = pdf('Poisson',0:4,1:5) p = 0.3679 0.2707 0.2240 0.1954 0.1755
See Also
betapdf
, binopdf
, cdf
, chi2pdf
, exppdf
, fpdf
, gampdf
, geopdf
, hygepdf
, lognpdf
, nbinpdf
, ncfpdf
, nctpdf
, ncx2pdf
, normpdf
, poisspdf
, raylpdf
, tpdf
, unidpdf
, unifpdf
, weibpdf
![]() | pcares | pdist | ![]() |