How to update a new step size in S-Function after keeping every two steps equal
Show older comments
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.
Accepted Answer
More Answers (0)
Categories
Find more on Configure C/C++ S-Function Features in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!