Filter löschen
Filter löschen


This question is locked. Öffnen Sie sie erneut, um sie zu bearbeiten oder zu beantworten.

Finding the minimum distance between two matrices

6 Ansichten (letzte 30 Tage)
James am 4 Jun. 2024
Locked: Matt J am 11 Jun. 2024
Hi, I have two matrices of xy co-ordinates, one being the outline of a train and one being the outline of the structure the train is passing through. I would like to find the minimum distance between these matrices to work out the minimum clearance. I am new to MATLAB and any help would be appreciated, thanks in advance.

Akzeptierte Antwort

Matt J
Matt J am 4 Jun. 2024
See pdist2.

Weitere Antworten (1)

Torsten am 4 Jun. 2024
Bearbeitet: Torsten am 4 Jun. 2024
Use one matrix to generate the curve and the other dataset as a list of points for which you want to compute the distance to the curve. Finally, take min(.) of the distances computed.
After this, you could reverse the roles of curve and list of points to see whether you get the same distance.

This question is locked.


Mehr zu Get Started with MATLAB finden Sie in Help Center und File Exchange




Community Treasure Hunt

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

Start Hunting!

Translated by