How to find a ratio of a current value of signal to its previous value in Simulink?

1 回表示 (過去 30 日間)
Gazi Taspinar
Gazi Taspinar 2021 年 5 月 3 日
回答済み: Jonas 2021 年 5 月 3 日
Hello,
I have a vector, R=[17 0 -10] which represents a coordinate of a mass. I modeled the equations of motions in Simulink and R vector changes as time goes by correctly. However, I want to find the ratio between the current value of R and previous value of R. For example,
at time=0, R(i)=[17 0 -10]
at time=0+dt, R(i+1)=[17.1 0 -9.99]
So, I want to find R(i+1)/R(i).
Thank you.

回答 (1 件)

Jonas
Jonas 2021 年 5 月 3 日
Use Unit Delay block to store the previous signal value.
Use Divide block to take the division of the signal and the output of the Unit Delay block.

カテゴリ

Help Center および File ExchangeSources についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by