| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → Statistics Toolbox |
| Contents | Index |
| Learn more about Statistics Toolbox |
Probability density function for Gaussian mixture distribution
y = pdf(obj,X)
y = pdf(obj,X) returns a vector y of length n containing the values of the probability density function (pdf) for the gmdistribution object obj, evaluated at the n-by-d data matrix X, where n is the number of observations and d is the dimension of the data. obj is an object created by gmdistribution or fit. y(I) is the cdf of observation I.
Create a gmdistribution object defining a two-component mixture of bivariate Gaussian distributions:
MU = [1 2;-3 -5]; SIGMA = cat(3,[2 0;0 .5],[1 0;0 1]); p = ones(1,2)/2; obj = gmdistribution(MU,SIGMA,p); ezsurf(@(x,y)pdf(obj,[x y]),[-10 10],[-10 10])

gmdistribution, fit, cdf, mvnpdf
![]() | pdf (piecewisedistribution) | ![]() |

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |