Info

この質問は閉じられています。 編集または回答するには再度開いてください。

Is the usage of a custom class as a property in a Matlab System block a intended behaviour?

1 回表示 (過去 30 日間)
Thomas Kucharczyk
Thomas Kucharczyk 2020 年 2 月 26 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
You can set a Matlab Value Class via the Simulink Dialog on a Matlab System block and call methods of the class in the stepImpl.
Since you can set it only when its attribute is Nontunable, is this a intended behavior of a Matlab System block?
function y = stepImpl(obj, varargin)
%#codegen
% obj.myClassA is a object of class ClassA
% someCalcMethod is a Method from ClassA: ClassA.someCalcMethod()
y = obj.myClassA.someCalcMethod(varargin{1});
end

回答 (0 件)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by