Calling Script from python
3 ビュー (過去 30 日間)
古いコメントを表示
Hi, i've been trying to call an script from python using the engine but i can't do it, the following message pops up:<matlab.engine.matlabengine.MatlabFunc object at 0x02C409D0>. I would appreciate if you could help me
0 件のコメント
回答 (1 件)
Bo Li
2017 年 1 月 27 日
I can reproduce your error message with following steps:
>>> import matlab.engine
>>> eng=matlab.engine.start_matlab("-nojvm")
>>> eng.sqrt
<matlab.engine.matlabengine.MatlabFunc object at 0x7f4efd26ded0>
If that is what you did, the simple fix is to provide arguments for the function call like this:
>>> eng.sqrt(4.)
2.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!