Path: news.mathworks.com!not-for-mail
From: "Jerecho " <jeric3182@mathworks.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: problem with the find function in matlab
Date: Sun, 6 Jan 2008 03:08:54 +0000 (UTC)
Organization: Saint Louis University
Lines: 26
Message-ID: <flpgo6$ouf$1@fred.mathworks.com>
References: <bf28c7fc-c160-40da-ac3b-0e7b48b025b1@v46g2000hsv.googlegroups.com>
Reply-To: "Jerecho " <jeric3182@mathworks.com>
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 1199588934 25551 172.30.248.35 (6 Jan 2008 03:08:54 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Sun, 6 Jan 2008 03:08:54 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 272932
Xref: news.mathworks.com comp.soft-sys.matlab:444508


koolguyuf <tdgoswami@gmail.com> wrote in message <bf28c7fc-
c160-40da-ac3b-0e7b48b025b1@v46g2000hsv.googlegroups.com>...
> Hi,
> 
> I am facing some weird behavior using the find function 
in matlab
> versions 7.0 and 7.5 . I have this extremely simple code 
to execute.
> 
> a = [0:0.2:2];
> my_index = find(a == 0.6)
> 
> plz let me know whether you are getting my_index = 4 ? 
Suprisingly, I
> am not able to get it.
> 
> Plz help.
> 
> Thanks
> TD

Hi,

Im also experiencing the same problem. But when I 
entered 'a' manually (i.e. a = [0 0.1 0.2 0.4 0.6 ... 2])
I get the correct answer.