Effacer les filtres
Effacer les filtres

Sfcn with discrete and continuous state, step size

4 vues (au cours des 30 derniers jours)
uli terlinden
uli terlinden le 21 Jan 2013
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.

Réponses (0)

Catégories

En savoir plus sur Introduction to Installation and Licensing dans Help Center et File Exchange

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by