TP-traitement-audio-visuel/TP3_dams/moindres_carres_ponderes.m
2023-06-22 20:47:16 +02:00

10 lines
244 B
Matlab

function X_1 = moindres_carres_ponderes(D_app,probas_1)
n_app = length(D_app);
x = D_app(1,:)';
y = D_app(2,:)';
A = [x.^2 x.*y y.^2 x y ones(n_app,1) ; 1 0 1 0 0 0];
X_1 = ([probas_1 1]' .* A) \ [zeros(n_app,1) ; 1];
end