Distance between point and a line ?

How do I calculate the normal distance between a point and a line connecting two other defined points ? ex p = [0 0] and a line connecting
A = [1 -2]; B = [-1 -1];

1 Comment

Jan
Jan on 9 May 2017
Edited: Jan on 9 May 2017
Please use helpful tags only. There is no relation to ODE45, therefore I've removed these tags.

Sign in to comment.

Answers (2)

Guillaume
Guillaume on 9 May 2017
Edited: Guillaume on 9 May 2017
Have you tried your favorite search engine? The first link that comes up for me, Wikipedia, has the answer.
Note that this has nothing to do with matlab, it's just (very basic) maths.
ahmed
ahmed on 20 Aug 2017
this question have been answered by a mathwork staff heremathwork staff here

Categories

Find more on Programming in Help Center and File Exchange

Tags

No tags entered yet.

Asked:

on 9 May 2017

Answered:

on 20 Aug 2017

Community Treasure Hunt

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

Start Hunting!