Use input vector S-function to define initial conditions x0()

조회 수: 2 (최근 30일)
Jan
Jan 2013년 5월 1일
Is there any way how use input vector S-function to define initial conditions x0(). I know I can define these vector by varible in mask but it isn't good way for me.
Thanks a lot!

답변 (1개)

Kaustubha Govind
Kaustubha Govind 2013년 5월 1일
No, this is not possible. At the time that the block Initialize method runs, none of the block's Output methods have fun. So whatever block is upstream to your S-function hasn't yet written to it's output (which becomes the input to the S-function). However, there are some special blocks like the Delay block which have an input port to specify the Initial Condition (S-functions currently do not have this functionality). So perhaps you can somehow use this block in combination with your S-function to achieve what you need?
  댓글 수: 1
Jan
Jan 2013년 5월 1일
Thank you for reply. But i dont understand your solutions with Delay block. Maybe I should say:
In S-function I solve set of ODE's for solve step response of chemical reactor output variable. To compute ODE's I need first solve initial conditions x(0). Initial conditions are function of input vector u() and I can't use this vector u(0) while initializing.
Is it solvable by mentioned Delay?I wrote it understandable? :-)
Thanks!

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

카테고리

Help CenterFile Exchange에서 Block and Blockset Authoring에 대해 자세히 알아보기

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by