Check out example codes for "wait until job matlab". It will help you in understanding the concepts better.
Code Example 1
j = batch('myScript');
wait(j)
load(j)
submit(j);
wait(j,'finished')
results = fetchOutputs(j)
Learn ReactJs, React Native from akashmittal.com