20 lines
422 B
Mathematica
20 lines
422 B
Mathematica
|
function E = estimation_E(w1, w2)
|
||
|
|
||
|
A = zeros(size(w1, 1), 9);
|
||
|
for i=1:size(w1, 1)
|
||
|
A(i, :) = kron(w1(i,:), w2(i,:));
|
||
|
end
|
||
|
|
||
|
% on chope e à partir des valeurs propres de A'A
|
||
|
[V, D] = eig(A' * A);
|
||
|
e = V(:, 1);
|
||
|
|
||
|
% on obtient E à partir de e
|
||
|
E = reshape(e, 3, 3);
|
||
|
|
||
|
% on force les valeurs singulières de E
|
||
|
[U, S, V] = svd(E);
|
||
|
|
||
|
E = U * [1 0 0; 0 1 0; 0 0 0] * V';
|
||
|
|
||
|
end
|