TP-traitement-audio-visuel/TP3_dams/probabilites_EM_n.m
2023-06-22 20:47:16 +02:00

13 lines
339 B
Matlab

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