You can check the State property of the Future object returned by parfeval to see if it has finished. You might also be able to use the fetchNext method with a timeout of 0 to collect the result if it's ready. Something like this (untested...)
while keepGoing
fslow = parfeval(@slowFcn, ...
while isempty(fetchNext(fslow, 0))
fquick = parfeval(@quickFcn, ...
quickResult = fetchOutputs(fquick);
end
slowResult = fetchOutputs(fslow);
end
Best Answer