TP-analyse-donnees/TP3/moyenne.m
2023-05-29 16:43:44 +02:00

17 lines
223 B
Matlab
Executable file

function X = moyenne(im)
I = single(im);
R = I(:,:,1);
V = I(:,:,2);
B = I(:,:,3);
M = max(1, R + V + B);
r = R ./ M;
v = V ./ M;
X = [ mean(r(:)) mean(v(:)) ];
end