Given any two points, this function calculates two other points that lie along a line which is perpendicular to the line joining the given points. If these two lines are made to intersect at the first given point, we get a T-shape. This is a simple trivial function and the title picture illustrates everything. The perpendicular line is found by elementary mathematics (m1m2 = -1).
Sathyanarayan Rao (2020). Perpendicular Line to a given line forming a T-shape (https://www.mathworks.com/matlabcentral/fileexchange/66240-perpendicular-line-to-a-given-line-forming-a-t-shape), MATLAB Central File Exchange. Retrieved .