Is there any initialization block for parameters and constants in simulink model to be used throughout the model ?

조회 수: 1 (최근 30일)
Hi, I know that writting this in matlab script is a way to do it and also creating a variable from simulink is also a way to do it. I think these 2 methods are not neat. I would like to do the opposite have a block to do, initialize all the parameters and constants of the model in simulink. Please let me know what are the ways to do it.

채택된 답변

Fangjun Jiang
Fangjun Jiang 2023년 9월 29일
Use a Simulink Data Dictionary (.sldd). Start from here
  댓글 수: 17
Fangjun Jiang
Fangjun Jiang 2023년 10월 30일
No idea. You might have customized toolstrip.
In Simulink, press Ctrl+H to bring up Model Explorer, navigate to the MATLAB Function block on the left. On the right, it is the same UI.
VIGNESH BALAJI
VIGNESH BALAJI 2023년 10월 30일
I have not customised anything atleast knowingly. If you know how to bring back the standard toolbar, let me know. I followed the steps through model explorer and it worked. I need to first add it in External data and mention in function block as a parameter and also have it as an argument to the function.
Thanks and it worked :)

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Interactive Model Editing에 대해 자세히 알아보기

제품


릴리스

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by