Output first zero of a signal?

4 ビュー (過去 30 日間)
Oliver McEnteggart
Oliver McEnteggart 2012 年 8 月 10 日
Is there anyway to output the first time at which a signal is zero (excluding at t = 0)?

採用された回答

Kaustubha Govind
Kaustubha Govind 2012 年 8 月 10 日
You should be able to do this in Simulink with some combination of the Clock, Compare to Zero and perhaps some other basic Simulink blocks.

その他の回答 (2 件)

Azzi Abdelmalek
Azzi Abdelmalek 2012 年 8 月 10 日
use a "switch" block with three inputs
  1. a signal from "clock" block (input3) %to get time
  2. a signal from a "constant" block (input1)
  3. your signal (input2)
set a condition in a "switch" block, to select which signal will be the output of switch block: the constant 0 or the time from a clock. you have just to ignore when the output is zero

Oliver McEnteggart
Oliver McEnteggart 2012 年 8 月 10 日
Thanks for that help, I have another related question though how would I go about finding the time difference between each successive zero for the first 0.2 seconds of the simulation?

カテゴリ

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

タグ

製品

Community Treasure Hunt

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

Start Hunting!

Translated by