| MATLAB Central > MATLAB Newsreader > parfor loop with nested for loop |
|
|
|
Hi All |
|
Subject: parfor loop with nested for loop From: Christian Hesch Date: 15 Jun, 2009 18:01:04 Message: 2 of 9 |
|
"Cindy" <xzhan2@fhcrc.org> wrote in message <h15vkh$fia$1@fred.mathworks.com>... |
|
"Christian Hesch" <&christian.hesch@web.de> wrote in message <h1628v$a33$1@fred.mathworks.com>... |
|
Subject: parfor loop with nested for loop From: Christian Hesch Date: 15 Jun, 2009 19:28:02 Message: 4 of 9 |
|
"Cindy" <xzhan2@fhcrc.org> wrote in message <h163rh$qin$1@fred.mathworks.com>... |
|
Subject: parfor loop with nested for loop From: Raymond Norris Date: 15 Jun, 2009 19:54:01 Message: 5 of 9 |
|
Cindy, |
|
Thanks, Raymond and Christian! This makes sense. I had problem understanding the term 'slice variable' in the MATLAB document. I actually wants to generate the values for c from these loops. So combining the suggestions from both of you, maybe I should put |
|
Subject: parfor loop with nested for loop From: Christian Hesch Date: 15 Jun, 2009 21:09:02 Message: 7 of 9 |
|
This will be faster (at least, I hope so, depends on the size of m and n): |
|
I tried this. The same error message showed up. I think this is because j is not constant for the parfor, as noted by Raymond. |
|
Subject: parfor loop with nested for loop From: Christian Hesch Date: 17 Jun, 2009 05:30:19 Message: 9 of 9 |
|
"Cindy" <xzhan2@fhcrc.org> wrote in message <h16ds7$bfv$1@fred.mathworks.com>... |
A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.
Anyone can tag a thread. Tags are public and visible to everyone.
| Tag Activity for This Thread | ||
|---|---|---|
| Tag | Applied By | Date/Time |
| parfor indexing... | Raymond Norris | 15 Jun, 2009 15:59:04 |
Contact us at files@mathworks.com
