Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: create polygon coordinates
Date: Sat, 19 Jan 2013 18:06:08 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 11
Message-ID: <kdenag$nth$1@newscl01ah.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: www-06-blr.mathworks.com
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: newscl01ah.mathworks.com 1358618768 24497 172.30.248.38 (19 Jan 2013 18:06:08 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Sat, 19 Jan 2013 18:06:08 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1179041
Xref: news.mathworks.com comp.soft-sys.matlab:786871

I have coordinates such as this:

384 360 60 69

that represent the left, top, width, and height of an ellipse. How can I turn these values into a list that specifies a polygon?

I would like to use this polygon list to find out whether particular X and Y coordinates fall inside this ellipse:

k_inside1= inpolygon(X_Coordinate, Y_Coordinate, X_Polygon3, Y_Polygon3);

Thanks!