Parallel toolbox computing question

조회 수: 1 (최근 30일)
Leor Greenberger
Leor Greenberger 2012년 8월 5일
Hi. I have the parallel computing toolbox and I was curious if the following can be done.
I have a for loop that calls 3 functions in order. I want to call the first 2 functions sequentially and then call the 3rd function in a separate thread and loop. The first 2 functions fetch data and pass it to the third function, who then performs some calculations and outputs its results to its own text file and then terminates. Therefore, I would like to keep the for loop iterating without having to wait for the 3rd function to finish. Can this be done? Thanks!

답변 (1개)

Oleg Komarov
Oleg Komarov 2012년 8월 5일
You cannot call in parallel the 3rd function only since it depends on the inputs generated by function 2 and 1.
If the whole process (function 1-3) is independent at each iteration, then you can call all 3 of them in parallel.

카테고리

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