-
Save prachiisc/4668febcef55f6d857863ca9ffd920bd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
p = [0.2 0.8]; % Mixing proportions | |
mu = [1 2;-3 -5]; % Means | |
sigma = cat(3,[2 .5],[1 1]); % Covariances 1-by-2-by-2 array | |
gm = gmdistribution(mu,sigma); | |
fsurf(@(x,y)reshape(pdf(gm,[x(:),y(:)]),size(x)),[-10 10]); | |
xlabel('x1') | |
ylabel('x2') | |
zlabel('p(x)') |
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment