我正在尝试使用 MATLAB 对象进行概念验证。我想看看您是否可以在 Java 代码中使用如下所示的 MATLAB 对象。我们需要 MATLAB 对象来保持状态。我使用 MATLAB Builder JA 在 MATLAB 中创建函数并在 Java 中访问它们,但我不确定是否可以以相同的方式发送 MATLAB 类。
classdef TestObject < handle
properties (SetAccess = private)
number = 0;
end
methods
function addToNumber(TO, x)
TO.number = TO.number + x;
end
end
end % classdef