MATLAB Answers

Szabolcs

engGetVariable crashes after MATLAB has quit

Asked by Szabolcs
on 11 Feb 2013

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

 engEvalString(ep, "")

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.

  0 Comments

Products

0 Answers

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply today