Filter löschen
Filter löschen

Run multiple parfor loops

1 Ansicht (letzte 30 Tage)
boureghda mohammed
boureghda mohammed am 23 Feb. 2017
Beantwortet: Jan am 24 Feb. 2017
Is it possible to run multiple parfor loops successively like in the following example:
A = zeros(4, 10);
parfor i = 1:4
for j = 1:10
if j < 6
A(i, j) = i + j;
else
A(i, j) = pi;
end
end
end
B = zeros(4, 10);
parfor i = 1:4
for j = 1:10
if j < 4
B(i, j) = i ;
else
B(i, j) = 2*pi;
end
end
end
  1 Kommentar
KSSV
KSSV am 24 Feb. 2017
You should have run this and checked. It run's well. you can run two par fors successively.

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

Jan
Jan am 24 Feb. 2017
Yes.

Weitere Antworten (0)

Kategorien

Mehr zu Loops and Conditional Statements finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by