Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Find index of point inside array
Date: Fri, 27 Aug 2010 15:58:08 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 25
Message-ID: <i58nag$3eo$1@fred.mathworks.com>
References: <i58l3r$9v7$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-03-blr.mathworks.com
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1282924688 3544 172.30.248.38 (27 Aug 2010 15:58:08 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Fri, 27 Aug 2010 15:58:08 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1187260
Xref: news.mathworks.com comp.soft-sys.matlab:665558

"J D" <JD@USA.com> wrote in message <i58l3r$9v7$1@fred.mathworks.com>...
> I have a point 
> H = 
> [x y] 
> 
> The point H is inside an array of points that make a curve
> 
> F = 
> 
> [x1 y1;
> x2 y2;
> x3 y3;
> x4 y4;
> x5 y5;
> ...]
> 
> How do i pick out the index of the point in the array? 
> 
> example if [x y] = [x3 y3]
> 
> index(H,F) = 3
- - - - - - -
 p = find(all(bsxfun(@eq,F,H),2));

Roger Stafford