Hello,
I'm trying to execute matlab functions in python using the Matlab python package. However, when running an example from the documentation, I am getting an error message. When I run the code:
import matlabimport matlab.engineeng = matlab.engine.start_matlab()a = matlab.double([1,4,9,16,25])b = eng.sqrt(a)print(b)
I get the error message:
File "<ipython-input-7-6ccc095b323c>", line 1, in <module> runfile('/Users/rach/Google Drive/PHD/Programming/Winds/Trying.py', wdir='/Users/rach/Google Drive/PHD/Programming/Winds')File "//anaconda/envs/netcdf/lib/python2.7/site-packages/spyder/utils/site/sitecustomize.py", line 866, in runfile execfile(filename, namespace)File "//anaconda/envs/netcdf/lib/python2.7/site-packages/spyder/utils/site/sitecustomize.py", line 94, in execfile builtins.execfile(filename, *where)File "/Users/rach/Google Drive/PHD/Programming/Winds/Trying.py", line 4, 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 exTypeError: 'NoneType' object is not callable
What does this error mean? Is it something to do with how I have installed everything?
Thanks, Rachael
Best Answer