TP-traitement-audio-visuel/TP3/probabilites.m

15 lines
335 B
Mathematica
Raw Normal View History

2023-06-22 18:47:16 +00:00
function probas = probabilites(D_app, parametres_estim, sigma)
pi_vec = [0.5 0.5];
sigma = [sigma sigma];
probas = zeros(length(D_app), 2);
for k=1:2
probas(:,k) = pi_vec(k) / sigma(k) / sqrt(2*pi) * exp( - calcul_r(D_app, parametres_estim(k, :)).^2 / 2 / sigma(k) );
end
probas = probas';
end