Can a structure variable be updated within MATLAB Function block in Simulink?
Mostrar comentarios más antiguos
I am running a simulation of a physical system in Simlink using a MATLAB function block. In this regard, I have some parameters that are defined in a structure in MATLAB workspace. I passed that structure by defining it as a parameter to the MATLAB function block. However, the code in the block attempts to add more fields to that structure, but the Simulink won't allow me to do that, giving the following error:
new fields cannot be added when structure has been read or used
Is there a way I can dynamically update the structure within the Function block?
Thanks
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Event 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!