필터 지우기
필터 지우기

Run multiple parfor loops

조회 수: 2 (최근 30일)
boureghda mohammed
boureghda mohammed 2017년 2월 23일
답변: Jan 2017년 2월 24일
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
KSSV
KSSV 2017년 2월 24일
You should have run this and checked. It run's well. you can run two par fors successively.

댓글을 달려면 로그인하십시오.

채택된 답변

Jan
Jan 2017년 2월 24일
Yes.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by