People use MATLAB to carry out optimization by:

a) importing value of a variable of interest from a .dat/.msg file

b) using this scalar in a mathematical model

c) updating the value by changing some parameter in the .inp file and running again until convergence is achieved

My question is: is it possible to do this in real time without having to wait for a run to finish? After a cursory look, it does not seem like UEXTERNALDB is going to be of much help or is it?

Your help is appreciated!

Thanks!