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?

 Respuesta aceptada

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.

Más respuestas (0)

Categorías

Más información sobre Loops and Conditional Statements en Centro de ayuda y File Exchange.

Productos

Versión

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by