Path: news.mathworks.com!not-for-mail
From: "Jack " <use.text.after.underscore.only_jcannon@csu.edu.au>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Help needed with indexing to the first occurrence of a value
Date: Thu, 4 Jun 2009 02:37:35 +0000 (UTC)
Organization: Charles Sturt University
Lines: 14
Message-ID: <h07c1f$dve$1@fred.mathworks.com>
References: <h079fp$166$1@fred.mathworks.com> <h07b65$jv8$1@fred.mathworks.com>
Reply-To: "Jack " <use.text.after.underscore.only_jcannon@csu.edu.au>
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 1244083055 14318 172.30.248.35 (4 Jun 2009 02:37:35 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Thu, 4 Jun 2009 02:37:35 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1819435
Xref: news.mathworks.com comp.soft-sys.matlab:544694


Hi Sadik,

Thanks for the reply... i tried your suggestion, however the returned variable is an empty matrix...?

Jack


"Sadik " <sadik.hava@gmail.com> wrote in message <h07b65$jv8$1@fred.mathworks.com>...
> You could say
> 
> firstIndex = find(F==98,1);
> 
> "Jack " <use.text.after.underscore.only_jcannon@csu.edu.au> wrote in message <h079fp$166$1@fred.mathworks.com>...
> > I have a single column vector "F". How can I index to the first occurrence of a the value "98". Only the row at which "98" first occurs is needed (... yes, I am a newbie to matlab). I am having trouble correctly using the find and index functions... Any help would be greatly appreciated. Thanks