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?

 採用された回答

MathWorks Support Team
MathWorks Support Team 2019 年 2 月 1 日

0 投票

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 ExchangeLoops 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