Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Cell Arrays with StarP?
Date: Fri, 30 May 2008 13:51:01 +0000 (UTC)
Organization: The MathWorks Inc
Lines: 48
Message-ID: <g1p0o5$5mp$1@fred.mathworks.com>
References: <g1ku4q$emf$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-03-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1212155461 5849 172.30.248.38 (30 May 2008 13:51:01 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Fri, 30 May 2008 13:51:01 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1277893
Xref: news.mathworks.com comp.soft-sys.matlab:471385



Hi David.

I know this is possible using the Parallel Computing 
Toolbox product with MATLAB. The syntax would be

parfor i = 1:n
  do something to A{n}
end

I do not know about with star-P.

Cheers.
Sarah

"David Doria" <daviddoria@gmail.com> wrote in message 
<g1ku4q$emf$1@fred.mathworks.com>...
> I am looking to utilize the "parallel for" idea with 
starP.
> An example I got from the website is as follows:
> 
> %serial version
> a=rand(100,100,500);
> tic; for i = 1:500
> 	b(:,:,i) = inv(a(:,:,i));
> end; toc
> 
> %parallel version:
> a=rand(100,100,500*p);
> tic; b=ppeval('inv',a); toc
> 
> However, I would like to put each element of a cell array
> though a parallel for loop:
> 
> A{1} = some matrix
> A{2} = another matrix
> ... etc
> A{n} = last matrix
> 
> Parallel For i = 1:n
>   do something to A{n}
> end
> 
> Is this possible? 
> 
> Thanks,
> 
> Dave