1 function dist=line_dist(x1,y1,x2,y2,x3,y3)
3 % Volodymyr Kondratenko August 2011
5 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
7 % finds the distance from (x3,y3) to line through (x1,y1) and (x2,y2)
11 dist=(abs(A*x3+B*y3+C))/(sqrt(A*A+B*B));