MATLAB Answers

Szabolcs
0

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

Join the 15-year community celebration.

Play games and win prizes!

Learn more
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

MATLAB Academy

New to MATLAB?

Learn MATLAB today!