Path: news.mathworks.com!not-for-mail
From: "Jayveer " <jveer@jveer.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: please help optimize this ('find' is too slow)
Date: Thu, 4 Dec 2008 07:12:08 +0000 (UTC)
Organization: University of Manchester
Lines: 16
Message-ID: <gh7vs8$fgq$1@fred.mathworks.com>
References: <gh46f4$pg2$1@fred.mathworks.com> <gh7ror$eno$1@fred.mathworks.com>
Reply-To: "Jayveer " <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 1228374728 15898 172.30.248.37 (4 Dec 2008 07:12:08 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Thu, 4 Dec 2008 07:12:08 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1206797
Xref: news.mathworks.com comp.soft-sys.matlab:504891


Hello Roger

Thank you for the suggestion. However i dont see how it'll solve my problem.

1. yes the faces are aligned with the three coordinate axes
2. there are 8 nodes, hence the '8' in NCx,NCy and NCz but you are right: there are six limits given by max(NCx(1,:)) and so on.

The main flaw in your proposed solution is the sorting. The PinC function is part of a much larger program which calls this function hundreds of times. The index of the P values represent the associated particle number. The PiC end result needs to reflect that indexing otherwise it wont work with the rest of the program.

Please take a look at the sample data and solution provided on http://idisk.mac.com/jveer-Public?view=web

Have you got any other recommendations? I need the ouput PiC to be exactly the way this function outputs i.e with the correct indexing. 


"Roger Stafford" <ellieandrogerxyzzy@mindspring.com.invalid> wrote in message <gh7ror$eno$1@fred.mathworks.com>...
> "Jayveer " <jveer@jveer.com> wrote in message <gh46f4$pg2$1@fred.mathworks.com>...