def c1(a1,b1):
a1=2
b1=3
cc=a1+b1
return cc
I have saved this function in test.py. When I use this function in MATLAB I encountered this problem:
import py.test.* c1(2,3)
Undefined function 'c1' for input arguments
of type 'double'.
py.test.c1(2,3)
Undefined variable "py" or class
"py.test.c1".
How can I use .py function in MATLAB R2014b?
If you get the error message below, a failure has occurred.
Undefined variable "py" or class
There are a lot of things that might be wrong here, and Mathworks have actually set up a whole tutorial for how to troubleshoot this problem. (The title of the page is actually: Undefined variable "py" or function "py.command", so it should contain most of what you need)
Check out the following:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With