FindPeaks没有使用我的数据返回峰值及其位置?

时间:2016-05-15 11:41:15

标签: matlab plot analysis

我正在使用如下的findPeaks,但它返回了峰值和位置的空数组。有谁知道这可能是什么问题,是否是我的数据问题?

[PKS,LOCS]=findpeaks(X);

我的X有以下值:

0.0250000000000000 0.0500000000000000 0.0500000000000000 0.0500000000000000 0.0750000000000000 0.100000000000000 0.125000000000000 0.125000000000000 0.125000000000000 0.125000000000000 0.125000000000000 0.125000000000000 0.125000000000000 0.125000000000000 0.125000000000000 0.125000000000000 0.125000000000000 0.125000000000000 0.125000000000000 0.125000000000000 0.125000000000000 0.125000000000000 0.125000000000000 0.125000000000000 0.125000000000000 0.125000000000000 0.125000000000000 0.125000000000000 0.125000000000000 0.125000000000000 0.125000000000000 0.125000000000000 0.125000000000000 0.125000000000000 0.125000000000000 0.125000000000000 0.125000000000000 0.125000000000000 0.125000000000000 0.125000000000000 0.125000000000000 0.125000000000000 0.125000000000000 0.125000000000000 0.125000000000000 0.125000000000000 0.125000000000000 0.125000000000000 0.125000000000000 0.125000000000000 0.125000000000000 0.125000000000000 0.125000000000000 0.125000000000000 0.125000000000000 0.125000000000000 0.125000000000000 0.125000000000000 0.125000000000000 0.125000000000000 0.125000000000000 0.125000000000000 0.125000000000000 0.125000000000000 0.125000000000000 0.125000000000000 0.125000000000000 0.125000000000000 0.125000000000000 0.125000000000000 0.125000000000000 0.125000000000000 0.125000000000000 0.125000000000000 0.125000000000000 0.125000000000000 0.125000000000000 0.125000000000000 0.125000000000000 0.125000000000000 0.125000000000000 0.125000000000000 0.125000000000000 0.125000000000000 0.125000000000000 0.125000000000000 0.125000000000000 0.125000000000000 0.125000000000000 0.125000000000000 0.125000000000000 0.125000000000000 0.125000000000000 0.125000000000000 0.125000000000000 0.150000000000000 0.175000000000000 0.175000000000000 0.200000000000000 0.225000000000000 0.225000000000000 0.225000000000000 0.225000000000000 0.225000000000000 0.225000000000000 0.225000000000000 0.250000000000000 0.275000000000000 0.275000000000000 0.275000000000000 0.300000000000000 0.325000000000000 0.350000000000000 0.375000000000000 0.400000000000000 0.400000000000000 0.400000000000000 0.425000000000000 0.425000000000000 0.425000000000000 0.425000000000000 0.450000000000000 0.475000000000000 0.500000000000000 0.525000000000000 0.550000000000000 0.550000000000000 0.550000000000000 0.575000000000000 0.600000000000000 0.625000000000000 0.650000000000000 0.675000000000000 0.675000000000000 0.675000000000000 0.700000000000000 0.775000000000000 0.800000000000000 0.825000000000000 0.825000000000000 0.825000000000000 0.850000000000000 0.875000000000000 0.900000000000001 0.925000000000001 0.925000000000001 0.925000000000001 0.925000000000001 0.950000000000001 0.975000000000001 0.975000000000001 1.00000000000000 1.00000000000000 1.00000000000000 1.00000000000000 1.00000000000000 1.00000000000000 1.00000000000000 1.00000000000000 1.00000000000000 1.00000000000000 1.00000000000000 1.00000000000000 1.00000000000000 1.00000000000000 1.00000000000000 1.00000000000000 1.00000000000000 1.00000000000000 1.00000000000000 1.00000000000000 1.00000000000000 1.00000000000000 1.00000000000000 1.00000000000000 1.00000000000000 1.00000000000000 1.00000000000000 1.00000000000000 1.00000000000000 1.00000000000000 1.00000000000000 1.00000000000000 1.00000000000000 1.00000000000000 1.00000000000000 1.00000000000000 1.00000000000000 1.00000000000000 1.00000000000000 1.00000000000000 1.00000000000000 1.00000000000000 1.00000000000000 1.00000000000000 1.00000000000000 1.00000000000000 1.00000000000000 1.00000000000000 1.000000000000001.00000000000000 1.00000000000000 1.00000000000000 1.00000000000000 1.00000000000000 1.00000000000000 1.00000000000000 1.00000000000000 1.00000000000000 1.00000000000000 1.00000000000000 1.00000000000000 1.00000000000000 1.00000000000000 1.00000000000000 1.00000000000000 1.00000000000000 1.00000000000000 1.00000000000000 1.00000000000000 1.00000000000000 1.00000000000000 1.00000000000000 1.00000000000000 1.00000000000000 1.00000000000000 1.00000000000000 1.00000000000000 1.00000000000000 1.00000000000000 1.00000000000000 1.00000000000000 1.00000000000000 1.00000000000000 1.00000000000000 1.00000000000000 1.00000000000000 1.00000000000000 1.00000000000000 1.00000000000000 1.00000000000000 1.00000000000000 1.00000000000000 1.00000000000000 1.00000000000000 1.00000000000000 1.00000000000000 1.00000000000000 1.00000000000000 1.000000000000001.00000000000000 1.00000000000000 1.00000000000000 1.00000000000000 1.00000000000000 1.00000000000000 1.00000000000000 1.00000000000000 1.00000000000000 1.00000000000000 1.00000000000000 1.00000000000000 1.00000000000000 1.00000000000000 1.00000000000000 1.00000000000000 1.00000000000000 1.00000000000000 1.00000000000000 1.00000000000000 1.00000000000000 1.00000000000000 1.00000000000000 1.00000000000000 1.00000000000000 1.00000000000000 1.00000000000000 1.00000000000000 1.00000000000000 1.00000000000000 1.00000000000000 1.00000000000000 1.00000000000000 1.00000000000000 1.00000000000000 1.00000000000000 1.00000000000000 1.00000000000000 1.00000000000000 1.00000000000000 1.00000000000000 1.00000000000000 1.00000000000000 1.00000000000000 1.00000000000000 1.00000000000000 1.00000000000000 1.00000000000000 1.00000000000000 1.000000000000001.00000000000000 1.00000000000000 1.00000000000000 1.00000000000000 1.00000000000000 1.00000000000000 1.00000000000000 1.00000000000000 1.00000000000000 1.00000000000000 1.00000000000000 1.00000000000000 1.00000000000000

2 个答案:

答案 0 :(得分:0)

您的数据中没有峰值,您只有一个上升的函数,它以平顶结束。

您可以使用max()函数检测要检测的内容。 您可能希望提供完整的代码和数据示例以进行更详细的讨论。

答案 1 :(得分:0)

由于没有峰值,请使用max而不是

[val, idx] = max(X)

或者如果你想找到上升沿的上限值,也许这可能有效:

idx =(find(X(1:end-2)<X(2:end-1) & X(2:end-1) >= X(3:end))) + 1