Home > other >  Ask: call the custom python function matlab error: can't find the function
Ask: call the custom python function matlab error: can't find the function

Time:05-02

(2019.4.3) : python's custom function called matlab error: could not find the function,
Python is created in the test. Py files, and have been added to the matlab search path, the file content is as follows:


In matlab, the input pyversion, results:


Matlab call python test. Py files, no error:


However, call test. Py file mysum function, lack of the problem:



Consult bosses, what is wrong with this, baidu did not find similar situation

CodePudding user response:

Excuse me, can you solve it, I also appears the question, don't know how to solve

CodePudding user response:

Try to restart MATLAB?

CodePudding user response:

Try y=py. Test. Mysum (int32 (10), int32) (20), take a look at this line not line

CodePudding user response:

If all sorts of reasons are tried, it should check whether your function itself has a good error ~

The same directory, some functions can be found, and some found it, then I found that said no definition of the function is the function itself code is wrong, after changed with respect to OK ~
  • Related