如何提取数组的部分元素

2019-07-17 12:52发布

比如一维数组A=[0.1,0.1,0.2,0.3,.0.4,0.4,0.3,0.2,0.1,0.1,0.1,0.1,0.2,0.3,.0.4,0.5,0.3,0.2,0.1,0.1,
0.1,0.1,0.2,0.3,.0.5,0.6,0.3,0.2,0.1,0.1,],假定设置一个阈值0.3,连续大于0.3的数组成一个新的数组,即新组成的数组分别为[0.4,0.4],[0.4,0.5],[0.5,0.6]

实际上类似于图片所示,分别提取信号的脉冲序列
求教各位大神如何实现呢
QQ截图20170119083604.jpg
友情提示: 此问题已得到解决,问题已经关闭,关闭后问题禁止继续编辑,回答。