Borrar filtros
Borrar filtros

Matlab .m file from Simulink keeps running?

1 visualización (últimos 30 días)
saladin ghanem
saladin ghanem el 16 de Jun. de 2017
Respondida: Swarooph el 22 de Jun. de 2017
I uses an interpreted Matlab Function to execute a .m file. The problem is the Simulink model keeps running and running and the Matlab function starts and finishes again and again until some counter in the bottom of the Simulink model is being %100.
My question is, How to run my .m file for Only One Time? Thanks, Salah

Respuestas (1)

Swarooph
Swarooph el 22 de Jun. de 2017
When do you want to run this MATLAB function? Only at the start once, when you load the model once, when you stop simulation once? etc. For all these, use the Model callbacks. You can access these by using the right click on model canvas > Model Properties > Callbacks tab as shown in the picture below.
Relevant documentation links below:

Categorías

Más información sobre Model, Block, and Port Callbacks 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!

Translated by