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?

回答 (2 件)

Brian Hart
Brian Hart 2019 年 1 月 22 日

0 投票

Try using sys.addpath in Python.
Manu Manuel
Manu Manuel 2020 年 3 月 6 日
編集済み: Manu Manuel 2020 年 3 月 6 日

0 投票

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

1 件のコメント

Athul Prakash
Athul Prakash 2020 年 10 月 30 日
You may combine genpath with addpath to add the folder with all its subfolders too.
Sometimes, just eng.cd can be a good alternative.

サインインしてコメントする。

カテゴリ

製品

リリース

R2018a

質問済み:

2019 年 1 月 22 日

コメント済み:

2020 年 10 月 30 日

Community Treasure Hunt

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

Start Hunting!

Translated by