Path: news.mathworks.com!newsfeed-00.mathworks.com!oleane.net!oleane!news.ecp.fr!aioe.org!not-for-mail
From: dpb <none@non.net>
Newsgroups: comp.soft-sys.matlab
Subject: Re: problem with the find function in matlab
Date: Sat, 05 Jan 2008 10:23:02 -0600
Organization: Aioe.org NNTP Server
Lines: 31
Message-ID: <flob4t$kn0$1@aioe.org>
References: <bf28c7fc-c160-40da-ac3b-0e7b48b025b1@v46g2000hsv.googlegroups.com>
NNTP-Posting-Host: wsURXsApU8HhvabVTUkVtQ.user.aioe.org
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: abuse@aioe.org
User-Agent: Thunderbird 2.0.0.9 (Windows/20071031)
Xref: news.mathworks.com comp.soft-sys.matlab:444483


koolguyuf wrote:
> 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.

W/ R12 it returns 4.

What does it return for you?

What platform?

If not 4, one would have to presume there's an issue of exact matching 
for the particular combination of OS/version/hardware.

To get to the bottom of behavior, need above information at least. 
Executing the lines and pasting results could be useful as could

  a = [0:0.2:2];
  b = a - 0.6

just possibly be educational...

--