Info

This question is locked. 请重新打开它进行编辑或回答。

Finding the minimum distance between two matrices

11 次查看(过去 30 天)
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
See pdist2.

更多回答(1 个)

Torsten
Torsten 2024-6-4
编辑:Torsten 2024-6-4
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.

类别

Help CenterFile Exchange 中查找有关 Get Started with MATLAB 的更多信息

产品


版本

R2006b

Community Treasure Hunt

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

Start Hunting!

Translated by