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

12 lines
407 B
Matlab

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