matlab.System class discrete state update mechanism
2 次查看(过去 30 天)
显示 更早的评论
Hello everyone, In Matlab 2017a, I have a class definition that is inherited from matlab.System class such that
classdef Tank < matlab.System
Then, I added a Discrete state for position parameter into class definition.
properties(DiscreteState)
itsPos
end
I instantiate an objet from this class in Simulink by using Matlab System Block. However, I don't know how to update that discrete state.
Since Simulink designates this state as model discrete state, I made implementation that Simulink solver updates the state.
If it is not valid, where should I implement the update method in the class definition? In stepImpl method of the class?
How do I feed system sample time into the class method stepImpl for the implementation of solver method?
Thanks.
0 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Create System Objects 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!