Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Get line index on matrix
Date: Thu, 5 Nov 2009 11:46:02 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 21
Message-ID: <hcudtq$phk$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-05-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1257421562 26164 172.30.248.35 (5 Nov 2009 11:46:02 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Thu, 5 Nov 2009 11:46:02 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 2076570
Xref: news.mathworks.com comp.soft-sys.matlab:582684


Hello,

I'm trying to get the line index of a nx3 matrix for a given vector (1x3), like

0.1  0.3  1.6
0.2  0.7  1.2
1.3  0.1  7.3
(...)

searching for vector = 0.2 0.7 1.2 should return index = 2.

i've tried find() and a script which compares

    if(vector(i,:) == points(i,:))
        index = i;

inside a for() loop (but it says that the condition is not valid, on debug)

I would appreciate your help.

Best regards