Path: news.mathworks.com!not-for-mail
From: "zac " <sony_1000@o2.pl>
Newsgroups: comp.soft-sys.matlab
Subject: intersection of line&&line and point&&line
Date: Sun, 22 Aug 2010 09:33:07 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 24
Message-ID: <i4qqsj$lg3$1@fred.mathworks.com>
Reply-To: "zac " <sony_1000@o2.pl>
NNTP-Posting-Host: webapp-05-blr.mathworks.com
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1282469587 22019 172.30.248.35 (22 Aug 2010 09:33:07 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Sun, 22 Aug 2010 09:33:07 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 2270535
Xref: news.mathworks.com comp.soft-sys.matlab:664033

Hello,

i would like to find intersection of two lines or point and line.
I am using polyxpoly command.
But unfortunately it works only with two lines.
If i have that example:

point:
a = [3 3];
b = [3 3];
line:
c = [1 3];
d = [10 3];

 [xi yi] = polyxpoly([a(1) b(1)],[a(2) b(2)], [c(1) d(1)],[c(2) d(2)]);

the resulat of that is:
xi=yi=[];

But there is an intersection in [x y] = [3 3].

How fix it?
Thanks for any advice.
ZaC.