我有一个字符串形式的MatLab函数名(变量名为‘Function_NAME’),这是用户的输入,我需要以某种方式从Python调用该函数.下面您可以看到我是如何try 使用变量名调用此函数的,但它退出时出现了以下错误:(<class 'matlab.engine.MatlabExecutionError'>, MatlabExecutionError("Undefined function 'chsn_agthm' for input arguments of type 'uint8'.\n"), <traceback object at 0x0000015D14323C00>)
import matlab.engine
eng = matlab.engine.start_matlab()
res = eng.function_name(input1, input2, nargout=2)