Simulink - Change continuous state value at a given time point
古いコメントを表示
Hello, I have a model with a Level-2 MATLAB S-Function simulating continuous states. At a given time point I want one of the continuous state values to increase by a given value. It is even not really important, that the value changes on exactly that time point.
I tried to solve it with a signal, that changes from 0 to the value at the time point and then used the Difference, or the Memory block to get the signal to only be the value at one timestep, otherwise 0. Then added the value to the continuous state in the s-function output. But with this method the value is somehow integrated and the increase of the continuous state much too high.
I am glad for any help.
採用された回答
その他の回答 (1 件)
Kaustubha Govind
2012 年 5 月 25 日
0 投票
I'm curious about why you chose to use continuous states instead of discrete states if you do not need the state to be integrated. See my answer here for a brief explanation of continuous and discrete states in Simulink.
カテゴリ
ヘルプ センター および File Exchange で Simulink Coder についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!