Java函数在Matlab类中变得未定义
我开始在matlab中使用OOP。然而,在代码中使用java对象让我有点头疼。 具体来说,我在尝试运行testClass时遇到了这个错误。开始():
Undefined function 'SessionSettings' for input arguments of type 'char'.
上述函数存在于jar中,该jar被导入,如果在matlab类之外运行,代码运行良好。 下面是课程:
classdef testClass
properties
data
end
methods
function obj = testClass()
% class constructor
javaaddpath /home/test/test-examples-1.5.3.jar;
import test.examples.thingy.*;
end
function ret = start()
%
settings = sessionSettings('configFilePath');
end
end
end
# 1 楼答案
引用^{} 的文件:
这意味着您的方法
start()
将看到一个空的导入列表