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.

 채택된 답변

Birdman
Birdman 2018년 3월 28일

0 개 추천

You should write them to File->Model Properties->Model Properties->Callbacks->InitFcn.

댓글 수: 5

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
Hmm, you need to operate that within Simulink itself, in the simulation.
yes, that is what I need.
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

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Modeling에 대해 자세히 알아보기

질문:

2018년 3월 27일

댓글:

2018년 4월 2일

Community Treasure Hunt

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

Start Hunting!

Translated by