DistBetween2Segment​HP(A1,A2,B1,B2)

Version 1.0.0.0 (3.69 KB) by Li Ye
Designed for high performance computation. Return distances between N segments and N segments.
60 Downloads
Updated 18 Nov 2016

View License

This function is designed for high performance computation by avoiding use any loop and judgement statement. It can return N distances between N 2D segments and N 2D segments.
% A1,A2 is the matrix of two points of segment A, N*2
% B1,B2 is the matrix of two points of segment A, N*2
% shortestdistance is the matrix of distances between each two segment N*1
% directionvector indicate the vector of the shortestdistance N*2
% closepointonA and closepointonB is the nearest points on two segments N*2

% by Sky Li All right reserved.
% E-mail: skyliustc@gmail.com

Cite As

Li Ye (2026). DistBetween2SegmentHP(A1,A2,B1,B2) (https://www.mathworks.com/matlabcentral/fileexchange/60279-distbetween2segmenthp-a1-a2-b1-b2), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2014b
Compatible with any release
Platform Compatibility
Windows macOS Linux
Version Published Release Notes
1.0.0.0