.. highlightlang:: us .. index:: lokale minima und Maxima .. index:: Peaks .. index:: detect_peaks .. _detect_peaks: detect_peaks ============ .. us.tag detect_peaks GERMAN Interpolation New5500 :ref:`detect_peaks` finds peaks and valleys in a given noisy signal. Only local minima and maxima detected where the difference between adjacent extreme values are greater than the threshold. .. function:: = detect_peaks(rvY, rsThreshold); .. us.return **Return Value** *iMax* is a vector of indices of the local maxima (Peaks) or 0 if non are found. *iMin* is a vector of indices of the local minima (Valleys) or 0 if none are found. .. us.params **Parameters** .. uparam:: rvY *rvY* is a noisy signal vector. .. uparam:: rsThreshold *rsThreshold* is the peak threshold. Only peaks are detected where the difference between adjacent extreme values are greater than the threshold. .. us.example **Example** :: * = detect_peaks([4,6,3,4,7,4,1,8], 2) * iMax 2.0000 5.0000 8.0000 * iMin 3.0000 7.0000 .. us.history **History** .. list-table:: :header-rows: 1 * - Version - Description * - R2013.0 - New. .. seealso:: :ref:`overview-mathematic`, :ref:`moving_median`, :ref:`fspline`, :ref:`pspline`, :ref:`akimaspline`, :ref:`sgolayfilt`, :ref:`auto_xy_Peaks` :sub:`id-865033`