How to hold a value in simulink ?

202 ビュー (過去 30 日間)
Arthur MONVOISIN
Arthur MONVOISIN 2021 年 10 月 25 日
コメント済み: Arthur MONVOISIN 2021 年 10 月 28 日
Hello,
I search how to hold a value in my simulink model for an operation : I need to keep the latest value of my model and then add it to my signal until the input signal get to 0 again. It is like a vertical translation of my signal by the latest value calculated in the latest period.
Something like that :
Can a block in simulink do that or hold the latest value to add it to all the next iteration ?
Here is my simulink model :
K has the value 12.
A1 has the value 9.5e-5.
In input I have a custom repeating sequence from the fonction in the m file (force.m) :
I'm sorry for the size of each screen capture, I don't know how to manage it.
Thank you for your time.

採用された回答

Pranjal Kaura
Pranjal Kaura 2021 年 10 月 28 日
Hey Arthur,
You can refer to this link to know more about holding values in Simulink.
Hope this helps!
  1 件のコメント
Arthur MONVOISIN
Arthur MONVOISIN 2021 年 10 月 28 日
Thank you ! It worked !

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

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

製品


リリース

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by