How can I identify the x-values at which the first difference peaks?
1 view (last 30 days)
Show older comments
Vyshnave Sivasankar
on 11 Oct 2019
Commented: darova
on 11 Oct 2019
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))
Accepted Answer
Sulaymon Eshkabilov
on 11 Oct 2019
Hi,
Those 8 peak values of the variable bla can be obtained with:
Peaks_bla = bla(idx);
Good luck.
0 Comments
More Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!