Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Using ismember for binary search
Date: Mon, 1 Aug 2011 11:57:25 +0000 (UTC)
Organization: Procter &#38; Gamble Co
Lines: 19
Message-ID: <j164b4$ine$1@newscl01ah.mathworks.com>
References: <j14vsi$32l$1@newscl02ah.mathworks.com> <j155s9$gcr$1@newscl02ah.mathworks.com> <j157b3$jms$1@newscl02ah.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: www-02-blr.mathworks.com
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: newscl01ah.mathworks.com 1312199845 19182 172.30.248.47 (1 Aug 2011 11:57:25 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Mon, 1 Aug 2011 11:57:25 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1343420
Xref: news.mathworks.com comp.soft-sys.matlab:738260

"LP" wrote in message <j157b3$jms$1@newscl02ah.mathworks.com>...
> "Image Analyst" wrote in message <j155s9$gcr$1@newscl02ah.mathworks.com>...
> > Lyle:
> > Run this demo.  Perhaps all will then become clear:
> > 
> > a = sort(randi(100, 1, 10))
> > valueToLookFor = a(4)
> > logicalIndexes = squeeze(ismember(a, valueToLookFor))
> > actualIndex = find(logicalIndexes, 1, 'first')
> > fprintf('Found %d in "a" at index %d\n', valueToLookFor, actualIndex);
> 
> Hi image, 
> i think you'll find that solution only solves a subset of the problems defined in my example.
> 
> Ragards..
--------------------------------------------------------
How so?  Which subset is solved?
Which subset is not solved?
Image Analyst