function P=presek_premic(p1,p2) %P=presek_premic(p1,p2) %vrne presecisce premic p1=[a1 b1 c1] in %p2=[a2 b2 c2], kjer koordinate predstavljajo %koeficente enacb %a1*x+b1*y=c1 %a2*x+b2*y=c2 A=[p1(1:2);p2(1:2)];%matrika sistema d=[p1(3);p2(3)];%desna stran sistema P=A\d;%resimo sistem enacb