필터 지우기
필터 지우기

how to invoke a function in generated s function code?

조회 수: 1 (최근 30일)
Ajith
Ajith 2013년 1월 23일
In the generated code after building Sfunction builder, in the function mdlInitializeSampleTimes() I have to call a user defined function. What settings I have to do so that it will be automatically calling the user defined function inside mdlInitializeSampleTimes()?
  댓글 수: 2
Walter Roberson
Walter Roberson 2013년 1월 23일
How were you thinking of allowing the user to define the function? As best I recall at the moment, Simulink does not allow function handles to be passed.
Ajith
Ajith 2013년 1월 23일
Hi Walter, Right now I want to pass some function to clear the value stored in previous run as I am using some static variables in the C function which is a buffer.How can I call the function so that at sample time 0 I am getting the function called for clearing the buffer.

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

답변 (0개)

Community Treasure Hunt

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

Start Hunting!

Translated by