Finding the minimum distance between two matrices

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.

 채택된 답변

Matt J
Matt J 2024년 6월 4일

1 개 추천

See pdist2.

추가 답변 (1개)

Torsten
Torsten 2024년 6월 4일
편집: Torsten 2024년 6월 4일

0 개 추천

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.

카테고리

도움말 센터File Exchange에서 Get Started with MATLAB에 대해 자세히 알아보기

제품

릴리스

R2006b

질문:

2024년 6월 4일

Locked:

2024년 6월 11일

Community Treasure Hunt

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

Start Hunting!

Translated by