Output first zero of a signal?
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Is there anyway to output the first time at which a signal is zero (excluding at t = 0)?
0 comentarios
Respuesta aceptada
Kaustubha Govind
el 10 de Ag. de 2012
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.
0 comentarios
Más respuestas (2)
Azzi Abdelmalek
el 10 de Ag. de 2012
use a "switch" block with three inputs
- a signal from "clock" block (input3) %to get time
- a signal from a "constant" block (input1)
- 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
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/171595/image.png)
0 comentarios
Ver también
Categorías
Más información sobre Sources en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!