www.gusucode.com > stats 源码程序 matlab案例代码 > stats/PlotAGaussianMixtureCDFExample.m

    %% Plot a Gaussian Mixture CDF
%%
% Create a |gmdistribution| object defining a two-component mixture of
% bivariate Gaussian distributions.

% Copyright 2015 The MathWorks, Inc.

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)cdf(obj,[x y]),[-10 10],[-10 10])