How to specify initial states for simulink model in structured format?
이전 댓글 표시
Hi, I have a problem specifying initial states for my simulink model. Previously I did it like this,
options=simset('InitialState',initC); [t,x] = sim('EMMSACSIM_OPT',tBar,options);
where tBar is the time vector, and initC is the initial state vector. Now the newer version of matlab gives a warning and recommends that I specify the initial state in a structured format.
I could not find any examples for specifying initial state in a structured format , and would greatly appreciate if any one can share a few pointers.
Thanks.
답변 (1개)
Kaustubha Govind
2013년 5월 23일
1 개 추천
You can use Simulink.BlockDiagram.getInitialState to get the default initial state structure of your model, modify the values as needed, and then set it back as initial state.
카테고리
도움말 센터 및 File Exchange에서 Event Functions에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!