I am dabbling into the python matlab api. I'd like to use the API to enable a python program that is spawned indirectly as a result of a system call from matlab, and allow that python program to interact with the parent matlab session using the API. Something like this:
[status , result] = system('START wrapper_program.exe')
[status , result] = system('wrapper_program &')
if detected_wrapper_program_completion || timeout
function dataOut = python_api_entrypoint(dataIn)
dataOut = sum(dataIn);
Unfortunately, the above scheme only works if I put a breakpoint at the 'pause(0.1)' line, presumably because matlab control returns to the command line. Otherwise, matlab will not service a call from the python program unless we quickly breakout of the parent function and return matlab control to the command line. This smells like something drawnow() could help with, but no such luck. Any ideas?