TP-traitement-audio-visuel/TP9/kaczmarz.m

19 lines
279 B
Mathematica
Raw Normal View History

2023-06-22 18:47:16 +00:00
function f = kaczmarz(f, p, W)
n_mesures = size(p, 1);
W = W';
norm_W = sum(W.^2, 1);
for i = 1:n_mesures
Wi = W(:,i)';
norm_Wi = norm_W(i);
if norm_Wi > 0
f = f + (p(i) - Wi * f) / norm_Wi * Wi';
end
end
end