Batching different functions in a job

I read the documentation on batch functions,but I could not find the answer. I want to batch different functions in a job and want to fetch results when each of the tasks finished. For example I want to fetch the result of the function 1 without waiting for other function results. Is it possible?

댓글 수: 2

is your function 2 is calling inside of function 1? If this so then why are u not using break points in your code?
Emre Senol
Emre Senol 2017년 11월 22일
no i want to batch two different functions separately. Function 2 is not calling in function 1.

답변 (1개)

Edric Ellis
Edric Ellis 2017년 11월 23일

0 개 추천

You can use wait to see when your batch jobs have finished... perhaps something like this:
job1 = batch(@fcn_1, ...);
job2 = batch(@fcn_2, ...);
wait(job1); fetchOutputs(job1)
wait(job2); fetchOutputs(job2)
You can also use wait with a timeout if you want to poll to see which job completes first.

이 질문은 마감되었습니다.

질문:

2017년 11월 22일

마감:

2021년 8월 20일

Community Treasure Hunt

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

Start Hunting!

Translated by