14 lines
236 B
Matlab
14 lines
236 B
Matlab
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
|
|
|