Calling Script from python
3 views (last 30 days)
Show older comments
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 Comments
Answers (1)
Bo Li
on 27 Jan 2017
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
See Also
Categories
Find more on Call MATLAB from Python in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!