Read a parameter/block value only at the initialization in Simulink

4 ビュー (過去 30 日間)
Lucifer Jha
Lucifer Jha 2020 年 3 月 9 日
回答済み: Javier Gazzarri 2020 年 3 月 14 日
I want to measure a block parameter value just at the start( at t=0), while ignore the value for remaining time as the simulation progresses.
Being Specific: Here, ONLY the initial/start/beginning value out of block:(Voltage Measurement across the battery) needs go to the matlab function block, where based on that value certain output pattern is generated. But if the value keeps changing every time, the pattern gets altered.
How shall I read a block parameter value just at the initialization?

回答 (1 件)

Javier Gazzarri
Javier Gazzarri 2020 年 3 月 14 日
Hello Lucifer,
Thank you for your question.
Please see the attachment I created. If you put that block in series with the voltage measurement it will only pass the first value it sees.
Please let me know if this solves your problem.
Best regards,
Javier
jgazzarr@mathworks.com

カテゴリ

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

製品


リリース

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by