S-function flag calling from other functions
Mostrar comentarios más antiguos
Hi,
Is there anyway to call the mdlInitializeSizes() function from any other function in the matlab level 1 S-function. Thanks
Respuestas (1)
Kaustubha Govind
el 3 de Feb. de 2012
0 votos
I guess you could technically call it from any other method in the same S-function, just like you can call a MATLAB sub-function from the main or any other sub-function in a file. However, in case of an S-function, it is recommended that you let the Simulink engine call it at the right time. Is there a reason that you want to do this?
2 comentarios
koko kinder
el 3 de Feb. de 2012
Kaustubha Govind
el 6 de Feb. de 2012
Do you mean that you want to reset your states? This can only be done in the mdlUpdate method AFAIK. Where is your clear function called from? Note that the return value of the flag stage is important - for example, in mdlOutputs, only outputs can be returned and in mdlUpdate, only states can be returned.
Categorías
Más información sobre Create MATLAB S-Functions en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!