Way to solve AX=XB
조회 수: 13(최근 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
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)
참고 항목
범주
Find more on Mathematics and Optimization in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!