https://uk.mathworks.com/help/antenna/ref/optimizersadea.isfunctionevaluationsexhausted.html
isFunctionEvaluationsExhausted - Check function evaluations completion status - MATLAB
This MATLAB function checks whether the optimizer specified in obj has completed the specified function evaluations.
completion statuscheckfunctionevaluationsmatlab