How to store a value in Simulink?

3 ビュー (過去 30 日間)
Shraddha  Bakade
Shraddha Bakade 2015 年 7 月 23 日
回答済み: Azzi Abdelmalek 2015 年 7 月 23 日
Hello everyone I am desgning a model in which I need to store a value . For example: there is 2 inputs to the subsystem, input a & b .If a &b both are true, I calculate some values,say, x1 and x2. Now, next time when either a or b is false, I want to use those previously calcutaed values (i.e. when a & b were true). So, is there any way to store x1 and x2 in Simulink to use it later? Thanks in adcance.

回答 (1 件)

Azzi Abdelmalek
Azzi Abdelmalek 2015 年 7 月 23 日
If you mean how to use the previous values, you can use unit delay block . Or if you are using a Matlab function block you can use persistent command.

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by