I'm executing an .m script from C++ API (matlabEval). Unfortunately, I can't see the output until the script (e.g. one that calls fmincon) finishes, which can be quite a while. diary or the -log command line param don't do the trick. Guys, you must do something about this. If I'm connected to a matlab session through the API, which modifies the workspace, and commands can't be executed, there's no reason that I won't see a live output in the command window like executing the command from there.