The cat function concatenates the covariances along the third array dimension. The defined covariance matrices are diagonal matrices. sigma(1,:,i) contains the diagonal elements of the covariance matrix of component i.

Create a gmdistribution object by using the gmdistribution function.

gm = gmdistribution(mu,sigma,p)

gm =
Gaussian mixture distribution with 2 components in 2 dimensions
Component 1:
Mixing proportion: 0.400000
Mean: 1 2
Component 2:
Mixing proportion: 0.600000
Mean: -3 -5

Plot the cdf of the Gaussian mixture distribution by using fsurf.

gm — Gaussian mixture distribution gmdistribution object

Gaussian mixture distribution, also called Gaussian mixture model (GMM), specified as a gmdistribution object.

You can create a gmdistribution object using gmdistribution or fitgmdist. Use the gmdistribution function to create a
gmdistribution object by specifying the distribution parameters.
Use the fitgmdist function to fit a gmdistribution
model to data given a fixed number of components.

X — Values at which to evaluate cdf n-by-m numeric matrix

Values at which to evaluate the cdf, specified as an
n-by-m numeric matrix, where
n is the number of observations and
m is the number of variables in each
observation.

You can also select a web site from the following list:

How to Get Best Site Performance

Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.