필터 지우기
필터 지우기

how to make infinite loop for parallel computing

조회 수: 3 (최근 30일)
Namshik Han
Namshik Han 2011년 8월 11일
Hi,
I need to run an infinite loop and want to use parallel computing toolbox. The toolbox only provides "parfor" so I need to make an infinite "for" loop instead of while loop. I can use "for i=1: Inf" but MatLab cuts down the Inf to some huge number. How can I make real infinite loop like "while true"??
Thanks in advance, Namshik

답변 (2개)

the cyclist
the cyclist 2011년 8월 11일
I don't use the parallel computing toolbox, but I wonder if you can just nest a "while true" loop inside a "for i=1:1" loop to do what you want.

Walter Roberson
Walter Roberson 2011년 8월 11일
In newer versions, parfor runs the loop backwards... it is difficult to count backwards from infinity.

카테고리

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