Simulation time of From block based on values received

I have a simulink model with a from block which receives values 0 or 1 from the respective goto block. I want to know for how long the block has received the value 1 once it starts receiving 0 or vice versa during simulation. This can happen multiple times. Also the time value should be sent as input to a matlab function. How can I do this ? Can anyone help?

 Réponse acceptée

KL
KL le 3 Juin 2016

0 votes

Hello Senthil,
In Simulink library you can find detect change block which you can connect to the outout of your goto block and also use either integrator with a reset or a clock signal with logic block you can compute the duration of the signal. Hope it helps.

Plus de réponses (0)

Catégories

En savoir plus sur Simulink dans Centre d'aide et File Exchange

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by