How can I write an initialization values in simulink?

I'd like to write some values that are initialized once in the beginning in the program. The system is closed loop and there are equations depend on itself Ex.:
a= w*e+b;
b=f/a;
so we must write at the first, the values of ( w, e, and f) then the system will use the values which are being extracted from the simulink.

 Respuesta aceptada

Birdman
Birdman el 28 de Mzo. de 2018
You should write them to File->Model Properties->Model Properties->Callbacks->InitFcn.

5 comentarios

I tried this before, but the problem is the simulink does not calculate the equations by using the new values, which are being extracted from the simulink
Birdman
Birdman el 30 de Mzo. de 2018
Hmm, you need to operate that within Simulink itself, in the simulation.
yes, that is what I need.
Birdman
Birdman el 2 de Abr. de 2018
Ok, try something and ask specific questions. I am here.
Now the problem is: the simulink ran without any error, but it still does not use the new values, which are being extracted from the simulink

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Modeling en Centro de ayuda y File Exchange.

Preguntada:

el 27 de Mzo. de 2018

Comentada:

el 2 de Abr. de 2018

Community Treasure Hunt

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

Start Hunting!

Translated by