How can I identify the x-values at which the first difference peaks?

As you an see above, the first difference peaks at 8 values. What do i input to identify those 8 values. This is what I have so far to obtain the first difference (bla is what I defined my data as):
>> clear idx
thr = 4500;
m=1;
for ii = 2 : length(bla)
if bla(ii) > thr
idx(m,:) = ii;
m=m+1;
end
end
>> plot(diff(idx))

 Respuesta aceptada

Hi,
Those 8 peak values of the variable bla can be obtained with:
Peaks_bla = bla(idx);
Good luck.

Más respuestas (0)

Etiquetas

Preguntada:

el 11 de Oct. de 2019

Comentada:

el 11 de Oct. de 2019

Community Treasure Hunt

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

Start Hunting!

Translated by