Sfcn with discrete and continuous state, step size

1 view (last 30 days)
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.

Answers (0)

Categories

Find more on Introduction to Installation and Licensing in Help Center and File Exchange

Products

Community Treasure Hunt

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

Start Hunting!