TP-traitement-audio-visuel/TP9/kaczmarz.asv
2023-06-22 20:47:16 +02:00

25 lines
339 B
Plaintext

function f = kaczmarz(p, W, n_boucles)
% n_pixels = size(W, 2);
% n_mesures = size(p, 1);
[n_mesures, n_pixels] = size(W);
W = W';
f = zeros(n, 2);
for k = 1:n_boucles
for i = 1:n_mesures
Wi = W(:,i);
f = f + (p(i) - (Wi * f) / norm(Wi) * Wi';
end
end
end