MATLAB: How to use findpeaks to find the maximum for a stimulus that contains multiple events

MATLAB

Hi, I am wondering if I have a signal that contains mulitple events. Is it possbile to locate the the max peak for each event (see the attached picture) by uaing findpeaks? Thanks in advance

Best Answer

I would first use findchangepts (R2016a and later) to segment the signal, then use findpeaks on each segment.