How to compute data in simulink in an iteration save or update some variables and use in computation of next iteration?

7 views (last 30 days)
I have built a rubber spring model in simulink. During every iteration I need to use the outputs of the previous iteration,some variables (a,b) and compute new output values. say output(i)=fn(output,a,b) The values of variables (a,b) are also updated,so to be used for next iteration. say a=fn(output),b=fn(output)
How must I proceed?

Answers (1)

Kaustubha Govind
Kaustubha Govind on 23 Sep 2013
You can use the Unit Delay block to get the previous output value.

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!