You are now following this Submission
- You will see updates in your followed content feed
- You may receive emails, depending on your communication preferences
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 .
General Information
- Version 1.0.0.0 (3.69 KB)
MATLAB Release Compatibility
- Compatible with any release
Platform Compatibility
- Windows
- macOS
- Linux
| Version | Published | Release Notes | Action |
|---|---|---|---|
| 1.0.0.0 |
