峰值检测代码我要分享

Peak detection code

关注次数: 297

下载次数: 1

文件大小: 40.01 kB

代码分类: 其他

开发平台: matlab

下载需要积分: 2积分

版权声明:如果侵犯了您的权益请与我们联系,我们将在24小时内删除。

代码描述

中文说明:matlab寻找峰值代码。函数可以直接调用,返回设定区域的峰值的横纵坐标,非matlab自带函数,可以寻找多个峰值。算法满足:1.超过一个闕值,此值不用设的太高2.每次检测到满足1条件中的值,判定是否为峰值,不是则继续寻找,是则暂存为temp3.继续检测半个周期的数据,如寻得比temp值大的峰值,存为temp并重复步骤3,无则能断定此值为满足要求的峰值,记录下来。


English Description:

Matlab to find the peak code. The function can be called directly to return the abscissa and ordinate of the peak value in the set area. It is not a function of MATLAB and can find multiple peaks. The algorithm meets the following requirements: 1. If there is more than one threshold value, this value should not be set too high. 2. Each time the value that meets the condition 1 is detected, determine whether it is a peak value. If it is not, continue to search, and if it is temporary stored as temp3. Continue to detect the data of half a cycle. If the peak value larger than temp3 is found, save it as tempand repeat step 3. If there is no, it can be determined that this value is a peak value that meets the requirements, and record it.


代码预览

相关推荐