15 lines
457 B
Mathematica
15 lines
457 B
Mathematica
|
function parametres_estim = max_vraisemblance_n(D_app,parametres_test,sigma,n)
|
||
|
n_test = length(parametres_test);
|
||
|
result_r = zeros(1, n_test);
|
||
|
for i = 1:n_test
|
||
|
som_j = 0;
|
||
|
for j = 1:n
|
||
|
som_j = som_j + 0.5/sigma * exp(-calcul_r(D_app,parametres_test(i,j,:)).^2/(2*sigma^2));
|
||
|
end
|
||
|
result_r(i) = sum(log(som_j));
|
||
|
end
|
||
|
[~,index] = max(result_r);
|
||
|
parametres_estim = parametres_test(index,:,:);
|
||
|
end
|
||
|
|