Parameterizing the variables in simulink

조회 수: 2 (최근 30일)
632541
632541 2021년 2월 16일
댓글: Walter Roberson 2021년 2월 18일
Can I parameterize the variables in simulink ?
Like, I need to give value for one parameter and execution happens.
Then it should ask for next parameters to give for next block .
Then block executes. then it should ask for the next parameters of next block.
Then block executes. this will be done till the end of simulation (output is ready).
Pop -up message should come to ask for giving the value of the parameters of each block.
Can this be done in simulink?
If possible please suggest me the methods
  댓글 수: 1
632541
632541 2021년 2월 16일
Please try to help me to get the solution

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

채택된 답변

Walter Roberson
Walter Roberson 2021년 2월 16일
No. The "next block" is not very meaningful in Simulink: everything logically happens at the same time for continuous systems (except as modified by memory blocks or delay blocks or rate transition.)
Simulink groups blocks together in order to calculate algebraic equations that need to be satisfied to make the blocks work together. The blocks are not done individually: they are done as a group.
There is an ordering in Simulink, but not one that you have likely ever paid attention to; it has to do with ordering blocks so that datatypes can be made consistent.
Simulink has a debugging mode; perhaps you want to use that.
Perhaps what you need for your purpose is to use a MATLAB function that calls sim() for the model, specifying a StartTime and StopTime, and setting model parameters; when sim() returns you could use the normal graphic facilities to get user input about what they might want to change. You can then set model parameters using set_param(), and then sim() another time slice.
  댓글 수: 3
632541
632541 2021년 2월 18일
Can I have any pop-up during the simulation to provide variable values?
Walter Roberson
Walter Roberson 2021년 2월 18일
https://www.mathworks.com/help/simulink/control-and-visualize-simulations-with-interactive-displays.html

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 General Applications에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by