Borrar filtros
Borrar filtros

How to detect rise and fall of a sparse signal?

4 visualizaciones (últimos 30 días)
John
John el 18 de Mzo. de 2013
I have a signal where at certain points, it rises from 0 and goes back down to 0 for a given peak. I need the indices of the first point on the rise and the last point before it goes down to 0
For example, there's 3 peaks in this signal.
[ 0 0 0.1 0.2 0.3 0 0 0.3 0.4 0 0 0.5 0.7]
1st set of indices would be 3, 4, and 5 2nd set of indices would be 8, 9 3rd set of indices would be 12 and 13.
Keep in mind that if we are are at the beginning of the signal or the end of the signal, we just grab those indices as well similar to this example
Is there a function that can do this in Matlab?

Respuesta aceptada

Wayne King
Wayne King el 18 de Mzo. de 2013
Editada: Wayne King el 18 de Mzo. de 2013
If it really always goes from 0 and returns to zero. You can use
idx = find(x>0);
You can then look at the diff() of those points to determine where there are jumps of greater than 1.
For example,
jumpidx = find(diff(idx)>1);

Más respuestas (0)

Categorías

Más información sobre Measurements and Feature Extraction en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by