Way to solve AX=XB
24 次查看(过去 30 天)
显示 更早的评论
Is there any implementation of Tsai and lenz's (Or any other) method for solving AX=XB for hand- Eye Calibration?
0 个评论
回答(3 个)
Matt J
2023-1-28
编辑:Matt J
2023-1-28
[ma,na]=size(A);
[mb,nb]=size(B);
%size(X)=[na,mb]
X=null( kron(speye(mb),A) - kron(B.',speye(na)) );
X=reshape(X,na,mb,[]);
2 个评论
the cyclist
2023-1-28
I couldn't get this method to work. Am I overlooking something dumb?
rng default
A = rand(5);
B = rand(5);
[ma,na]=size(A);
[mb,nb]=size(B);
X=null( kron(speye(mb),A) - kron(B.',speye(na)) );
X=reshape(X,na,mb,[]);
Bruno Luong
2023-1-28
编辑:Bruno Luong
2023-1-28
null can only work wth full matrix
rng default
A = rand(5);
XX = rand(5);
B = XX\(A*XX);
[ma,na]=size(A);
[mb,nb]=size(B);
K=null( kron(eye(mb),A) - kron(B.',eye(na)));
R = rand(size(K,2),1); % Any random vector with this size will do the job
X = reshape(K*R,[na,mb])
norm(A*X-X*B)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!