Compute,store, and find min of 3d distances between two different matrices.
Show older comments
Hello, I have trouble using the built in functions of matlab to do this because what I want is different from what I think those functions do. I have two matrices of 3d points, say A and B. They do not have the same number than elements A<<B. I want to compute distances between each point in A and all points in B, and then be able to store it with the distance and index of the point in B. Then repeat for the next point in A until the end. I was thinking to try to use nested loops reiterating through A and the inner one through B, I just am unsure how to finely put the storage of the distance and index of the min into another vector or matrix (size A x 1)
Accepted Answer
More Answers (1)
Categories
Find more on Operating on Diagonal Matrices 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!