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

12 lines
407 B
Mathematica
Raw Normal View History

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