MATLAB Engine for python

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?

Risposte (2)

Brian Hart
Brian Hart il 22 Gen 2019

0 voti

Try using sys.addpath in Python.
Manu Manuel
Manu Manuel il 6 Mar 2020
Modificato: Manu Manuel il 6 Mar 2020

0 voti

path = # specify your path
eng.addpath (path, nargout= 0 )

1 Commento

Athul Prakash
Athul Prakash il 30 Ott 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.

Accedi per commentare.

Prodotti

Release

R2018a

Richiesto:

il 22 Gen 2019

Commentato:

il 30 Ott 2020

Community Treasure Hunt

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

Start Hunting!

Translated by