Findpeaks - excluding peaks within certain x axis values

I am using findpeaks (result seen below), however I would like to ignore the first peak within x axis 0 - 10. What is the best way to go about this?
Cheers

 Risposta accettata

findpeaks(y(x>10))
?

6 Commenti

Thank you! It works for me, but just out of curiosty, why do I not have to make reference to smooth_inWindow (the target I want to findpeaks of). It just knows, but I have confirmed that peaks at x axis 10 or below have been excluded. So it does work.
Code:
smooth_inWindow = smooth(inWindow);
[pks, locs] = findpeaks(y(x>10)); % Peak analysis
Actually scratch that it doesn't work. I try:
smooth_inWindow = smooth(inWindow);
[pks, locs] = findpeaks(smooth_in_Window,y(x>10)); % Peak analysis
but I get an error. Any idea how to approach this?
Nevermind I figured it out. Thanks a lot man.
Actually this doesn't seem to be working for me.
values i want to findpeaks of are stored in the variable siw. I've tried:
findpeaks(y(x>10))
findpeaks(siw(x>10))
findpeaks(siw,(x>10))
None have worked. Any advice?
I am using matlab2015
What does "not working" mean? Are you getting errors, wrong results? Post the MAT file and repro code. The below one looks right to me.
findpeaks(siw(x>10))

Accedi per commentare.

Più risposte (0)

Community Treasure Hunt

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

Start Hunting!

Translated by