MATLAB Engine for python

20 Ansichten (letzte 30 Tage)
Vaibhav Yadav
Vaibhav Yadav am 22 Jan. 2019
Kommentiert: Athul Prakash am 30 Okt. 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?

Antworten (2)

Brian Hart
Brian Hart am 22 Jan. 2019
Try using sys.addpath in Python.

Manu Manuel
Manu Manuel am 6 Mär. 2020
Bearbeitet: Manu Manuel am 6 Mär. 2020
path = # specify your path
eng.addpath (path, nargout= 0 )
  1 Kommentar
Athul Prakash
Athul Prakash am 30 Okt. 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.

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Call MATLAB from Python finden Sie in Help Center und File Exchange

Produkte


Version

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by