I'm trying to execute matlab functions in python using the Matlab python package. However, when running a simple example from the Mathworks website, I am getting an error message. When I run the code:
import matlab.engine
eng = matlab.engine.start_matlab()
a = matlab.double([1,4,9,16,25])
b = eng.sqrt(a)
print(b)
I get the error message:
File "/dir/Trying.py", line 27, in <module>
a = matlab.double([1,4,9,16,25])
File "//anaconda/envs/netcdf/lib/python2.7/site-packages/matlab/mlarray.py", line 51, in __init__
raise ex
TypeError: 'NoneType' object is not callable
What does this error mean? I can call functions that don't include lists OK but as soon as I try to pass a vector/list through I get the same error. I need to pass m x n arrays through so this is the key to doing that.
Thanks