Point to line distance [FAST]

Distance from a point to a 3D/2D line. Overloaded for multiple points and lines. Coordinates of projected point(s) also provided.
353 Downloads
Updated 16 Sep 2025
Check livescript (.mlx) and / or tests for some use examples.
Once downloaded, typewrite
help points2linedistance
or
help point2linesdistance
in Matlab console for support.
Please don't forget to rate it if this code helped you. Thanks ;-)

Cite As

Nicolas Douillet (2025). Point to line distance [FAST] (https://github.com/NicolasDouillet/point_to_line_distance/releases/tag/v4.1), GitHub. Retrieved .

MATLAB Release Compatibility
Created with R2019b
Compatible with any release
Platform Compatibility
Windows macOS Linux
Categories
Find more on Graphics Objects in Help Center and MATLAB Answers

Community Treasure Hunt

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

Start Hunting!
Version Published Release Notes
4.1

See release notes for this release on GitHub: https://github.com/NicolasDouillet/point_to_line_distance/releases/tag/v4.1

4.0

See release notes for this release on GitHub: https://github.com/NicolasDouillet/point_to_line_distance/releases/tag/v4.0

3.0

See release notes for this release on GitHub: https://github.com/NicolasDouillet/point_to_line_distance/releases/tag/v3.0

2.1

See release notes for this release on GitHub: https://github.com/NicolasDouillet/point_to_line_distance/releases/tag/v2.1

2.0

See release notes for this release on GitHub: https://github.com/NicolasDouillet/point_to_line_distance/releases/tag/v2.0

1.5

See release notes for this release on GitHub: https://github.com/NicolasDouillet/point_to_line_distance/releases/tag/v1.5

1.4

Update help, doc, description

1.3

Improved input parsing, vector format, updated help, doc, description, cover img

1.2

+ see also link, vocabulary line <- row

1.1

Completed summary

1.0.0

To view or report issues in this GitHub add-on, visit the GitHub Repository.
To view or report issues in this GitHub add-on, visit the GitHub Repository.