Changing value of variable while simulation is running
28 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
How can I change the value of a variable in a mathematical model while the simulation is running?
1 comentario
Respuestas (1)
Oguz Kaan Hancioglu
el 17 de Feb. de 2023
You can connect all input variables with the input block including model variables. After that, you can connect the Simulink inputs to the workspace using Data Import/Export screen in the configuration parameters. You can create an input vector with respect to time and Simulink updates the input vector using the time variable.
You can use the set_param function to change the value of each block during the simulation. However, it is really hard to make changes with respect to time. You need to add some extra logic, and Matlab functions in your Simulink file.
0 comentarios
Ver también
Categorías
Más información sobre Simulink Coder en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!