distance between point and line segments

the shortest distance between a line segment and a point
157 Downloads
Updated 12 Aug 2021

View License

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 Linux

Community Treasure Hunt

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

Start Hunting!
Version Published Release Notes
1.0.1

e

1.0.0