Azzera filtri
Azzera filtri

Info

This question is locked. Riaprila per modificarla o per rispondere.

Finding the minimum distance between two matrices

6 visualizzazioni (ultimi 30 giorni)
James
James il 4 Giu 2024
Locked: Matt J il 11 Giu 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.

Risposta accettata

Matt J
Matt J il 4 Giu 2024
See pdist2.

Più risposte (1)

Torsten
Torsten il 4 Giu 2024
Modificato: Torsten il 4 Giu 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.

Categorie

Scopri di più su Get Started with MATLAB in Help Center e File Exchange

Prodotti


Release

R2006b

Community Treasure Hunt

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

Start Hunting!

Translated by