14 lines
236 B
Mathematica
14 lines
236 B
Mathematica
|
function AD = attache_donnees(I, moyennes, variances)
|
||
|
|
||
|
n = length(moyennes);
|
||
|
AD = zeros([size(I), n]);
|
||
|
|
||
|
for i=1:n
|
||
|
AD(:,:,i) = log(variances(i)) + (I - moyennes(i)) .^2 / variances(i);
|
||
|
end
|
||
|
|
||
|
AD = AD / 2;
|
||
|
|
||
|
end
|
||
|
|