# How can I use the FINDPEAKS function in the Signal Processing Toolbox 6.8 (R2007b) to find flat peaks?

The FINDPEAKS function does not consider peak points to be valid unless they are strictly greater than the immediately neighboring points.

Reproduction Steps:

`good = [ 1 2 3 4 5 6 7 6 5 4 3 2 1];     % peak at 7findpeaks(good)  % this will return a value of 7bad = [ 1 2 3 4 5 6 6 5 4 3 2 1];        % adjacent peaks at 6findpeaks(bad)   % this will return null []`

I would like to be able to find flat tops (where the peak value is repeated a few times) using the FINDPEAKS function.

The FINDPEAKS function does not consider peak points to be valid unless they are strictly greater than the immediately neighboring points.

Reproduction Steps:

`good = [ 1 2 3 4 5 6 7 6 5 4 3 2 1];     % peak at 7findpeaks(good)  % this will return a value of 7bad = [ 1 2 3 4 5 6 6 5 4 3 2 1];        % adjacent peaks at 6findpeaks(bad)   % this will return null []`

I would like to be able to find flat tops (where the peak value is repeated a few times) using the FINDPEAKS function.

Matlabsolutions.com provide latest MatLab Homework Help,MatLab Assignment Help for students, engineers and researchers in Multiple Branches like ECE, EEE, CSE, Mechanical, Civil with 100% output.Matlab Code for B.E, B.Tech,M.E,M.Tech, Ph.D. Scholars with 100% privacy guaranteed. Get MATLAB projects with source code for your learning and research.

The ability to find peaks where the peak value occurs more than once is not available with FINDPEAKS function in Signal Processing Toolbox 6.6 (R2007b).

There are no workarounds.

--

--

--

## More from Technical Source

Simple! That is me, a simple person. I am passionate about knowledge and reading. That’s why I have decided to write and share a bit of my life and thoughts to.

Love podcasts or audiobooks? Learn on the go with our new app.

## Technical Source

Simple! That is me, a simple person. I am passionate about knowledge and reading. That’s why I have decided to write and share a bit of my life and thoughts to.