Generate Gaussian Mixture Distribution samples for PEM
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Bahman
am 10 Okt. 2018
Kommentiert: Bruno Luong
am 13 Okt. 2018
How to generate samples from GMM distribution? I wanna set them to point estimation method.
0 Kommentare
Akzeptierte Antwort
Bruno Luong
am 10 Okt. 2018
% Characteristics of your GM distribution
mu = [1,2,5]
sigma = [0.2, 0.3, 0.4];
A = [5 3 2];
% number of samples
n = 10000;
c = [0, cumsum(A(:)')];
c = c/c(end);
[~,i] = histc(rand(1,n),c);
r = randn(1,n).*sigma(i) + mu(i);
hist(r,100)
3 Kommentare
Weitere Antworten (0)
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!