How can I implement an impulse function in simulink?
9 ビュー (過去 30 日間)
古いコメントを表示
I've been trying to make a simulation giving a series of ODE running in simulink, but at certain times I need some variables to change abruptly, something like S(t_i + ) =S(t_i -)(1-x). I've tried to insert a matlab block function, given a series of points in time t_i , such that
for i=length(t_i)
if round(ti100)==round(t100)
dS=aux-x S;
else
dS=aux;
end
end
Such that the aux is the S'(t) without the impulse. However it does not work except for the last value of t_i, and also during the first moments of the simulation. I know there must be some other way, more easy and simple, I just haven't found it (I also tried to stop the simulation, change the initial values and start again, but I don't find this very elegant).
Can anybody illuminate me? Please? This has been quite stressful for long time and I just can't find the right help in any tutorial/previous question
0 件のコメント
回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Stress and Strain についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!