stop watch in Simulink

1 回表示 (過去 30 日間)
Franzi
Franzi 2011 年 11 月 14 日
Hello,
I have some difficulties with measuring the time between two 'events' (without using the Gauge-blockset). In Simulink I generate random numbers. Each time the output number is over 18 the measurement should be started until the number falls under 18 again.
Does anyone know how to realize it? I'm pretty bad at programming so I thought it's easier to use a triggered subsystem instead but I can't find a way to make it work.
Greetings, Franzi

回答 (1 件)

Fangjun Jiang
Fangjun Jiang 2011 年 11 月 14 日
Compare the number with the constant 18, it will generate pulse signals based on the value.
Feed the signal to an "Integrator" block. Enable the External reset. Use the falling edge to reset the integrator.

カテゴリ

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

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by