How to update a new step size in S-Function after keeping every two steps equal
古いコメントを表示
I have given the program flow chart below. The main technical problems of using S-Function to realize the function of this program are as follows : First, S-Function uses variable step size simulation ( this is easy to implement, that is, S-Function is set : ' ts = [ -20 ] ; ' ) ; secondly, it is required that every two steps are equal. For example, the first step and the second step are equal, the third step changes according to the input 'v ' of S-Function, but the fourth step and the third step are equal, and so on. I 've solved this problem logically through three flags ( flagForUpdateFrequency, flagForToggleOutputOne, flagForToggleOutputTwo ) in the given program flow, but I don 't know how to implement this logic in S-Function, because I can 't seem to simply add these three flags in S-Function ( it will be reported wrong ), so I hope to get your help.
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Simulink Functions についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!