Sfcn with discrete and continuous state, step size
3 次查看(过去 30 天)
显示 更早的评论
Hello,
I want to write a CMex SFcn with one contiuous and one discrete state. To update my discrete state, I need to gain access to the size of the current time step. As it is possible to define different types of sampleTimes, it should however be possible to get access to a discrete SampleTime. In my Manual, all makros that return the Time Step or the current Time or the Next time are explained to work in "discrete" SFcn's, such as "ssGetTNext", but my SFcn is not purely discrete.
I have to, be more explicit, tried it the following way: I have a discrete State, and in mdlUpdate, i tried to access the step size. However, this seems to be impossible using the above makros: "ssGetTNext" returns -1.#INF00000...0 Does anybody know, how i can access (read) the current step size in mdlUpdate ?
I'm quite unexperienced in using these SampleTime techniques, maybe this is why i do not really understand what the Simulink help wants to teach me about this.
Thanks for reading and Greetings anyway.
0 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Introduction to Installation and Licensing 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!