How to calculate the distances between the transformation matriecs?

1 Ansicht (letzte 30 Tage)
M
M am 17 Mai 2022
Bearbeitet: Rangesh am 26 Sep. 2023
How to calculate the distances between the transformation matriecs as the following:
norm([D]) = inv[of each T] multiply by the 3rd column of the attached metrices[T] of the another T
I mean I have to multiply each inverse of the attached matrices by each 3rd column of all other matrices expect the 3rd column of the same inv(T) .
Then I want to calculate the minimum distances between each matrix and the another one.
Attched are the transormation matrices.
  2 Kommentare
Torsten
Torsten am 17 Mai 2022
It depends on how you define the "distance" between matrices.
Just as
norm ( A(:) - B(:) )
if A and B are matrices of the same size ?
M
M am 17 Mai 2022
Bearbeitet: M am 17 Mai 2022
@Torsten , I want to calculate it as the following:
norm([D]) = inv[of each T] multiply by the 3rd column of the attached metrices[T] of the another T
I mean I have to multiply each inverse of the attached matrices by each 3rd column of all other matrices expect the 3rd column of the same inv(T) .
Then taking the norm of the output vector

Melden Sie sich an, um zu kommentieren.

Antworten (1)

Rangesh
Rangesh am 26 Sep. 2023
Bearbeitet: Rangesh am 26 Sep. 2023
Hello,
I understand that you want to calculate the norm of kth transformation matrix. The steps are as follows:
Col3rd= T(:,3,:) -T(:,3,k);% Array containing 3rd column of a transformation matrix except the kth.
Sum3rd=sum(Col3rd,3);% Calculating the sum along the z axis.
x=inv(T(:,:,k))*Sum3rd; % output vector
normK=norm(x); %norm of output vector
  • In the first two lines, we extract the third column from all transformation matrices except the kth transformation matrix. Then, we sum the extracted columns along the z-axis.
  • The next line calculates the inverse of the kth transformation matrix and multiplies it with the sum obtained in the previous step.
  • In the last line, we use the "norm" function to calculate the norm of the resultant vector.
Later, the minimum distance can be calculated by the obtained the norm of each transformation matrix.
You can refer to the following MATLAB Documentations on “array-indexing” and “sum” for more information:
I hope this resolves your query.
Thanks,
Rangesh.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by