1 function [x,y]=line_inter(x1,y1,x2,y2,x3,y3,x4,y4)
3 % Volodymyr Kondratenko August 2011
5 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
7 % finds the distance from (x3,y3) to line through (x1,y1) and (x2,y2)
11 x = (x1*m21-x3*m43-y1+y3)/(m21-m43);