MATLAB: How to calculate the shortest distance between points and a line

line

How to calculate the shortest distance between a set of points and a line? I have set of points and a lineer line, I want to find a point which is shortest distance to the line.

Best Answer

You can use the point_to_line_distance function.
Related Question