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

1 vue (au cours des 30 derniers jours)
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))

Réponse acceptée

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

Plus de réponses (0)

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by