Effacer les filtres
Effacer les filtres

Using parallel computing for two for loops

1 vue (au cours des 30 derniers jours)
sa za
sa za le 28 Sep 2013
Réponse apportée : Matt J le 28 Sep 2013
In my program(in matlab) I have two for loops and I want to use parallel computing for these loops:
#loop a
for i=1:120000
using var2(from the previous iteration (loop b)) and do something
and make var1
end;
#loop b
for j=1:120000
using var1(from the previous iteration(loop a)) and do something
and make var2
end;
my computer is dual core.can anyone help me?

Réponse acceptée

Matt J
Matt J le 28 Sep 2013
Seems like they should be combined into 1 loop
parfor i=1:120000
var1_new = (use var2)
var2_new = (use var1)
var1=var1_new;
var2=var2_new;
end

Plus de réponses (0)

Catégories

En savoir plus sur Loops and Conditional Statements dans Help Center et File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by