Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

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

Szabolcs

Products

0 Answers

Contact us