distance between point and line segments
Version 1.0.1 (1.29 KB) by
Mustafa Codur
the shortest distance between a line segment and a point
It provides not only the distance between a line segment and a point it also give the position of the nearest point.
v1, and v2 are the starting and ending positions of the line segment, while pt is the position of the point.
source is Malcolm Kesson
Cite As
Mustafa Codur (2024). distance between point and line segments (https://www.mathworks.com/matlabcentral/fileexchange/97462-distance-between-point-and-line-segments), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Created with
R2021a
Compatible with any release
Platform Compatibility
Windows macOS LinuxTags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.