How to change signal value at intermediate steps in Simulink?

2 ビュー (過去 30 日間)
Luis Ruiz
Luis Ruiz 2018 年 9 月 19 日
回答済み: Jesús Zambrano 2020 年 2 月 7 日
I have a Simulink model for two sensors. The first sensor has a frequency of 1 Hz and the second at 5 Hz. I am using a rate transition block to get the outputs at different rates.
How do I set the lower sensor, the one at 1 Hz, to output zeroes at intermediate steps?
TIME STEPS 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
sensor1 x x x x o x x x x o x x x x o x x x x o
sensor2 o o o o o o o o o o o o o o o o o o o o
I want sensor1 to output zeros, not to hold the signal at intermediate steps.

回答 (1 件)

Jesús Zambrano
Jesús Zambrano 2020 年 2 月 7 日
Hi Luis,
You could try include the sensor1 model in an enabled subsystem,
which can be controlled at 1Hz, when is enabled it shows the sensor value, when is disabled you can set it to show a certain value (0 in your case). See picture below
enabled_subsystem.png

カテゴリ

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

製品


リリース

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by