Hi everybody,
i have two 3D matrix A and B with different lengths. I need to build a for loop to calculate the pdist2 between the first row of A and all the rows of B, the second row of A and all the rows of B, …., the n row of A and all the rows of B.
An example of the two matrix:
A
X Y Z
0.2 0.4 0.5
1.4 0.6 4.5
0.3 0.5 3.1
B
X Y Z
0.8 0.7 0.5
1.4 0.9 1.5
0.2 3.5 2.1
0.3 0.7 0.5
2.4 0.3 0.5
0.2 3.5 3.1
Thank you very much!
Best Answer