https://www.mathworks.com/help/matlab/ref/endinvoke.html
EndInvoke - Retrieve result of asynchronous call initiated by .NET System.Delegate BeginInvoke...
This MATLAB function retrieves result of asynchronous call initiated by BeginInvoke method for Microsoft .NET Framework applications.