I am testing calling Python functions through MATLAB, but I am not getting what I expected. I figured I could call a Python function within MATLAB and have whatever that function returns, given to a MATLAB variable, as follows:
Python script (saved as test_for_mlab.py):
def out_func(arg_1):
print 'This print statement is in Python'
a = int(arg_1 * 10)
return a
MATLAB part:
val = py.test_for_mlab.out_func(33);
I was expecting val to have a value of 330 (int). Instead, the message I get in MATLAB is val = Python NoneType with no properties. None.
How can I get my desired results?