Is there some way to measure the time difference between two successive rising edges of a pulse train signal using Simulink in MATLAB 7.7 (R2008b)?

59 views (last 30 days)
I would like to measure the time elapsed between two successive rising edges of a pulse train signal using Simulink in MATLAB 7.7 (R2008b).

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 27 Jun 2009
Find the attached model that measures the time elapsed between two successive rising edges of a pulse train using Simulink in MATLAB 7.7 (R2008b).
This model consists of a triggered subsystem (triggered on rising edge) that has a pulse train control signal. Whenever there is a rising edge in the pulse train, the subsystem gets triggered. The input to this subsystem is a clock block (which measures the simulation time) and the output is also the same. Thus, whenever there is a rising edge in the pulse train, the subsystem outputs the simulation time. The output is held between successive triggers to the subsystem. This is illustrated by the y axis values in scope1.
The subtract block will provide the time elapsed between two successive rising edges. Scope shows this output.

More Answers (0)

Categories

Find more on Schedule Model Components in Help Center and File Exchange

Products


Release

R2008b

Community Treasure Hunt

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

Start Hunting!