From: "Jveer " <>
Newsgroups: comp.soft-sys.matlab
Subject: Re: please help optimize this ('find' is too slow)
Date: Thu, 11 Dec 2008 18:48:02 +0000 (UTC)
Organization: University of Manchester
Lines: 9
Message-ID: <ghrn92$k9o$>
References: <gh46f4$pg2$> <gh7ror$eno$> <gh7vs8$fgq$> <gh9faq$fb4$> <gh9qmi$l5c$> <gh9ske$6he$> <gha1vj$850$> <ghefbe$ell$> <gher83$sfd$> <ghfk6p$mu6$> <ghi6f9$3um$> <ghkqra$pq9$> <ghp95o$27o$>
Reply-To: "Jveer " <>
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: 1229021282 20792 (11 Dec 2008 18:48:02 GMT)
NNTP-Posting-Date: Thu, 11 Dec 2008 18:48:02 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1206797
Xref: comp.soft-sys.matlab:506396

First, thanks a lot for your time and effort, Roger. I really appreciate the help. The code you've provided is a very smart piece of coding and i humbly admit that i havent quite figured out how it works.

However, it isn't faster. it brought the time down by 2s on a sample data with 364685 particles and 18750 cells but increased the processing time by 20s on a sample with the same number of particles and 2535 cells. Very unfortunate to be honest coz i absolutely loved this solution.

do u think there is any way to optimize it wrt number of cells as well? there'll always be significantly more particles.    

"Roger Stafford" <> wrote in message <ghp95o$27o$>...
> "Jveer " <> wrote in message <ghkqra$pq9$>...
>   I worked out the details of that scheme I told you about, Jayveer, and include it below.  However, I do so with misgivings, since my impression is that it is very much slower than your method.  You can try it out and see.