simulink model property callback

조회 수: 2 (최근 30일)
ashwani gupta
ashwani gupta 2019년 5월 9일
댓글: Fangjun Jiang 2019년 5월 10일
Hi, i have a doubt in the intialization of a simulink model. Like can i define more than one function to File - Model properties - Model properties -call back-InitFcn ?
If yes is there any specific way or it is simple as calling one function ?

답변 (1개)

Fangjun Jiang
Fangjun Jiang 2019년 5월 9일
All the texts specified there are treated as code. So you could specify one line of code, or multiple lines with multiple functions.
  댓글 수: 2
ashwani gupta
ashwani gupta 2019년 5월 10일
Sir, i am using a pre written function in InitFnc to upload the design parameters. So now the question is "As you said that whatever will be written there used as a code but a\we are able to import a function too''. Now in the same sequence can we import two functions at the same time there ?
Ok i will do an excersice and let you know wheather it will be possible or not ?
Fangjun Jiang
Fangjun Jiang 2019년 5월 10일
What do you mean by "import two functions"? You can certainly run two functions like "fun1;fun2;" in sequence. You can even put an if-else statement in the InitFcn callback section to run functions conditionally.

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

카테고리

Help CenterFile Exchange에서 Model, Block, and Port Callbacks에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by