Home > manopt > manifolds > essential > privateessential > essential_closestRepresentative.m

essential_closestRepresentative

PURPOSE ^

SYNOPSIS ^

function Q2r=essential_closestRepresentative(Q1,Q2,varargin)

DESCRIPTION ^

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function Q2r=essential_closestRepresentative(Q1,Q2,varargin)
0002 [tMin,~,Q2]=essential_distMinAngle(Q1,Q2,varargin{:});
0003 NQ1=size(Q1,3);
0004 NQ2=size(Q2,3);
0005 
0006 if NQ1>1 && NQ2==1
0007     Q2=repmat(Q2,[1 1 NQ1]);
0008 end
0009 NQ=max(NQ1,NQ2);
0010 
0011 Q2r=zeros(size(Q2));
0012 for iQ=1:NQ
0013     t=tMin(iQ);
0014     Rz=[cos(t) -sin(t) 0; sin(t) cos(t) 0; 0 0 1];
0015     Q2r(1:3,1:3,iQ)=Rz*Q2(1:3,1:3,iQ);
0016     Q2r(4:6,1:3,iQ)=Rz*Q2(4:6,1:3,iQ);
0017 end

Generated on Mon 10-Sep-2018 11:48:06 by m2html © 2005