Parallel code for "multi for" loops
1 view (last 30 days)
Show older comments
How make a multi for loop in parallel? See example below.
for i = 1:Nodex
for j=1:Nodey
nodpos_X((i-1)*Nodey+j,1) = (i-1) * delta + (delta / 2.0)*(-Nodex+1);
end
end
1 Comment
Walter Roberson
on 25 Jun 2015
That already seems to be nested for loops. I notice that your right hand side does not involve j, so you will end up with multiple copies of the same value.
See Also
Categories
Find more on Loops and Conditional Statements in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!