13 lines
339 B
Mathematica
13 lines
339 B
Mathematica
|
function probas = probabilites_EM_n(D_app,parametres_estim,n,sigma)
|
||
|
n_app = length(D_app);
|
||
|
probas = zeros(n,n_app);
|
||
|
p = zeros(1,n);
|
||
|
for i = 1:n_app
|
||
|
for j = 1:n
|
||
|
p(j) = 1/n/sigma * exp(-calcul_r(D_app(:,i),parametres_estim(j,:)).^2 / (2*sigma^2));
|
||
|
end
|
||
|
probas(:,i) = p/sum(p);
|
||
|
end
|
||
|
end
|
||
|
|