Path: news.mathworks.com!not-for-mail
From: "Jveer " <jveer@jveer.com>
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$1@fred.mathworks.com>
References: <gh46f4$pg2$1@fred.mathworks.com> <gh7ror$eno$1@fred.mathworks.com> <gh7vs8$fgq$1@fred.mathworks.com> <gh9faq$fb4$1@fred.mathworks.com> <gh9qmi$l5c$1@fred.mathworks.com> <gh9ske$6he$1@fred.mathworks.com> <gha1vj$850$1@fred.mathworks.com> <ghefbe$ell$1@fred.mathworks.com> <gher83$sfd$1@fred.mathworks.com> <ghfk6p$mu6$1@fred.mathworks.com> <ghi6f9$3um$1@fred.mathworks.com> <ghkqra$pq9$1@fred.mathworks.com> <ghp95o$27o$1@fred.mathworks.com>
Reply-To: "Jveer " <jveer@jveer.com>
NNTP-Posting-Host: webapp-02-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1229021282 20792 172.30.248.37 (11 Dec 2008 18:48:02 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Thu, 11 Dec 2008 18:48:02 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1206797
Xref: news.mathworks.com 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" <ellieandrogerxyzzy@mindspring.com.invalid> wrote in message <ghp95o$27o$1@fred.mathworks.com>...
> "Jveer " <jveer@jveer.com> wrote in message <ghkqra$pq9$1@fred.mathworks.com>...
>   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.