how to make infinite loop for parallel computing
1 次查看(过去 30 天)
显示 更早的评论
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
0 个评论
回答(2 个)
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.
0 个评论
Walter Roberson
2011-8-11
In newer versions, parfor runs the loop backwards... it is difficult to count backwards from infinity.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Loops and Conditional Statements 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!