主要内容

找到当地的极端

Find local maxima and minima in the Live Editor

Description

The找到当地的极端task lets you interactively find local maxima and local minima in data. The task automatically generates MATLAB®code for your live script.

Using this task, you can:

  • Find local maxima, minima, or both in data from a workspace variable.

  • Adjust parameters to locate fewer or more extrema.

  • Automatically visualize the detected extrema.

Open the Task

To add the找到当地的极端MATLAB LIVE编辑器中实时脚本的任务:

  • On theLive Editortab, clickTask并选择找到当地的极端icon

  • In a code block in the live script, type a relevant keyword, such asextrema或者寻找。选择找到当地的极端从建议命令完成。

Parameters

This task operates on input data contained in a vector, table or timetable. The data can be of typesingle,double,logical, or signed or unsigned integer types such asint64

When providing a table or timetable for the input data, specifyAll supported variables用支持类型的所有变量操作。万博1manbetx选择All numeric variablesto operate on all variables of typesingle或者double, or signed or unsigned integer types. To choose specific supported variables to operate on, selectSpecified variablesand then select the variables individually.

当您具有本地连续超值值时,指定平坦的区域指标。

Method Description
Center Indicates only the center element of a flat region as the local extrema.
First Indicates only the first element of a flat region as the local extrema.
Last Indicates only the last element of a flat region as the local extrema.
All Indicates all the elements of a flat region as the local extrema.

Specify a minimum prominence to return only local extrema whose prominence is at least that value. Higher prominence values return fewer detected extrema.

The prominence of a local maximum (or peak) is a measure of how the peak stands out with respect to its height and location relative to other peaks. The prominence of a local minimum (or valley) is a measure of how the valley stands out with respect to its depth and location relative to other valleys.

Specify a prominence window type and size to define a window of neighboring points for which to compute the prominence for each local extrema.

Window Description
Centered 指定的窗口长度以当前点为中心。
Asymmetric Specified window containing the number of elements before the current point and the number of elements after the current point.

窗口尺寸相对于X-axisvariable units.

Version History

Introduced in R2019b

expand all

R2022A中的行为发生了变化