Path: news.mathworks.com!not-for-mail
From: "Steven Lord" <slord@mathworks.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: problem with the find function in matlab
Date: Sun, 6 Jan 2008 19:43:51 -0500
Organization: The MathWorks, Inc.
Lines: 25
Message-ID: <flrsk7$s5v$1@fred.mathworks.com>
References: <bf28c7fc-c160-40da-ac3b-0e7b48b025b1@v46g2000hsv.googlegroups.com>
Reply-To: "Steven Lord" <slord@mathworks.com>
NNTP-Posting-Host: lords.dhcp.mathworks.com
X-Trace: fred.mathworks.com 1199666631 28863 144.212.105.187 (7 Jan 2008 00:43:51 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Mon, 7 Jan 2008 00:43:51 +0000 (UTC)
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.3138
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3198
X-RFC2646: Format=Flowed; Original
Xref: news.mathworks.com comp.soft-sys.matlab:444577



"koolguyuf" <tdgoswami@gmail.com> wrote in message 
news: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.

This is a very frequently asked question.

http://matlabwiki.mathworks.com/MATLAB_FAQ

Question 6.1 talks about this type of behavior.

-- 
Steve Lord
slord@mathworks.com