How to create matlab workspace in python
5 ビュー (過去 30 日間)
古いコメントを表示
like this
I want to use python to create d=2 and in the workspace
Thanks!
0 件のコメント
回答 (2 件)
Hans-Joachim Steinort
2021 年 9 月 1 日
In your python file it looks for example like:
import matlab.engine
eng = matlab.engine.start_matlab()
eng.workspace['yourVar1'] = 1
eng.workspace['yourVar2'] = 'YourSecondValue'
You can also start this process directly from your python interpreter.
>>> import matlab.engine
>>> eng = matlab.engine.start_matlab('-desktop')
>>> eng.workspace['yourVar1'] = 1
If you start the matlab session with the -desktop option Matlab's GUI is opened and you can directly see the changes.
0 件のコメント
Vineet Joshi
2021 年 3 月 23 日
As per my understanding of your question, you wan to use MATLAB with Python.
All information regarding this can be found here:
You can also consult the following webinar for a detailed overview.
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Call MATLAB from Python についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!