how to give initial condition to simulink function variables

조회 수: 37 (최근 30일)
John
John 2023년 8월 2일
편집: Fangjun Jiang 2023년 8월 29일
i have tried initial condition block and memory block but they are not working. Does simulink fucntion takes 0 as default initial condition or what? do i have to make changes in code or there is some block for this? please help

답변 (2개)

Sulaymon Eshkabilov
Sulaymon Eshkabilov 2023년 8월 29일
A general answer is Yes. But what function you are talking about - could you please mention here? MATLAB function block or MATLAB system, S-function or something else in Simulink environment?

Fangjun Jiang
Fangjun Jiang 2023년 8월 29일
편집: Fangjun Jiang 2023년 8월 29일
A Simulink Function is like a Simulink model. Depending on the blocks that are used inside the Simulink Function, some blocks have initial value parameters, others don't.
You can use the "Initial Condition" block to set the initial condition of the signal at its input port.

카테고리

Help CenterFile Exchange에서 Simulink Functions에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by