MATLAB Engine for python

9 visualizaciones (últimos 30 días)
Vaibhav Yadav
Vaibhav Yadav el 22 de En. de 2019
Comentada: Athul Prakash el 30 de Oct. de 2020
I have successfully installed matlab.engine module in python.
But, i want to open a matlab file which is not in the same folder as that of python code. How to add path of such remote file and open it using matlab engine in python?

Respuestas (2)

Brian Hart
Brian Hart el 22 de En. de 2019
Try using sys.addpath in Python.

Manu Manuel
Manu Manuel el 6 de Mzo. de 2020
Editada: Manu Manuel el 6 de Mzo. de 2020
path = # specify your path
eng.addpath (path, nargout= 0 )
  1 comentario
Athul Prakash
Athul Prakash el 30 de Oct. de 2020
You may combine genpath with addpath to add the folder with all its subfolders too.
Sometimes, just eng.cd can be a good alternative.

Iniciar sesión para comentar.

Categorías

Más información sobre Call MATLAB from Python en Help Center y File Exchange.

Productos


Versión

R2018a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by