Path: news.mathworks.com!not-for-mail
From: "Brendan " <c_uboid88@hotmail.co.uk>
Newsgroups: comp.soft-sys.matlab
Subject: Find row
Date: Wed, 7 Apr 2010 16:15:28 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 11
Message-ID: <hpib30$9s4$1@fred.mathworks.com>
Reply-To: "Brendan " <c_uboid88@hotmail.co.uk>
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 1270656928 10116 172.30.248.35 (7 Apr 2010 16:15:28 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Wed, 7 Apr 2010 16:15:28 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 2224735
Xref: news.mathworks.com comp.soft-sys.matlab:624305

Hi,
I have a 1110x4 array and want to find the row in which a certain condition is satisfied..
For example if I have:
Y=[y1;y2;y3;y4] where y1,y2,y3,y4 are 1110 long vectors,
I want to find the row in which:
atan2(y1/y2)==certain value.

I can find the row for Max and Min using [C,I]=min(Y) etc but am not sure how to check if the atan2 condition is satisfied.
Any ideas? Im sure its relatively easy but...
Thanks
Brendan