can i determine whether a matlab engine is already running
Mostrar comentarios más antiguos
I would like to avoid restarting the matlab engine every time I need a matlab calculation. Is there a way to determine whether an engine is already running? I currently start a new engine every time using
#python
eng = matlab.engine.start_matlab()
I have tried storing the eng object in a redis key-value store but the object reference seems to get converted to a string.
Respuestas (2)
Jeremy Rutman
el 27 de Sept. de 2015
Bo Li
el 28 de Sept. de 2015
What do you mean by "eng.shareEngine runs but does not seems to create a shared engine"?
Typically, you would launch a MATLAB and convert it into a shared session:
%MATLAB code
>>matlab.engine.shareEngine
After that, you can connect to this shared MATLAB from a Python session:
>>>engs=matlab.engine.find_matlab()
>>>eng=matlab.engine.connect_matlab(engs[0])
Not sure about the redis issue, but it should be applicable to other Python objects.
Categorías
Más información sobre Call MATLAB from Python en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!