Why does algebraic loop not use values from previous time step

I am expecting the output of a block in an algebraic loop at time step (n-1), to be the input to the next block in the loop at time step n. But it does not use the previous value, and uses a different value. Why is that?

 采纳的回答

If you want the output of a block in an algebraic loop at time step (n-1), to be the input to the next block in the loop at time step n, then you would have to introduce a memory/state element in the loop.
This can be achieved by introducing a 'Unit Delay' anywhere in the loop, preferably where you know the exact initial conditions.

更多回答(0 个)

类别

帮助中心File Exchange 中查找有关 Loops and Conditional Statements 的更多信息

产品

版本

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by