When using the MATLAB Engine interface, if the MATLAB process quits, engGetVariable(ep, "name") simply crashes (at least on OS X it does).
What is the best way to deal with this problem?
The only solution I can see is to do
to test whether MATLAB is still running before each single engGetVariable(). Is there a better way? I wish engGetVariable were smart enough to handle this situation and just return NULL if MATLAB is not running.