取消
显示结果 
搜索替代 
您的意思是: 

Search array

I have two 1-D arrays. One contains the amplitude and the other contains their index (from another array). As an example:

 

Amplitude array: 9.8, 10,   9.7, 9.9, 10.1,    9.1, 9.9, 9.6, 9.8 ...

       Index array:   1,   3,    49,  50,    53,     97,101, 102,104...

 

In index array, note that after certain counts, the value increases drastically (the minimum increment value is known, say 40, 49-3 =46 >40; 97-53=44>40; ...).

 

I want to generate another array to extract peak values from Amplitude array, i.e., 10, 10.1, 9.9, ...

 

How to do this in labview.

 

Thanks 

0 项奖励
1 条消息(共 11 条)
4,091 次查看

@Alice12 wrote:

I have two 1-D arrays. One contains the amplitude and the other contains their index (from another array). As an example:

 

Amplitude array: 9.8, 10,   9.7, 9.9, 10.1,    9.1, 9.9, 9.6, 9.8 ...

       Index array:   1,   3,    49,  50,    53,     97,101, 102,104...

 

In index array, note that after certain counts, the value increases drastically (the minimum increment value is known, say 40, 49-3 =46 >40; 97-53=44>40; ...).

 

I want to generate another array to extract peak values from Amplitude array, i.e., 10, 10.1, 9.9, ...

 

How to do this in labview.

 

Thanks 


Use the peak detector VI on your amplitude array (the index array is not necessary to find the peaks). I used 9.7 as the threshold and got the three peak numbers you mentioned.

 

0 项奖励
2 条消息(共 11 条)
4,085 次查看

The threshold value is not known. It could be anything. 

Also the arrays are very large (500) in size.

0 项奖励
3 条消息(共 11 条)
4,075 次查看

Ok, so I left threshold at 0.0 and got the same result. And an array of only 500 values is not a problem.

 

(HINT:You could always try the Peak Detector and see what you get)

0 项奖励
4 条消息(共 11 条)
4,068 次查看

Thanks for your reply.

 

Peak Detector doesn't work in my case. The data which I presented was very simple.

 

Amplitude array: 9.8, 10,   9.7, 9.9, 10.1,    9.1, 9.9, 9.6, 9.8 ...

       Index array:   1,   3,    49,  50,    53,     97,101, 102,104...

 

In actual case, for example, 9.7, 9.9, 10.1 could be 9.7, 9.9, 10.1, 10.2,10.4, 10.5, 10.7, 9.2, 9.4 at locations  47, 49, 51, 53, 55, 57, 59, 61, 63. In this case (the minimum increment value is,

say, 30, only this value is known beforehand).

 

0 项奖励
5 条消息(共 11 条)
4,059 次查看

You lost me with the minimum increment and locations thing. What does that have to do with the array of amplitudes? You need to post an example of the actual data for which you want to find peaks.

0 项奖励
6 条消息(共 11 条)
4,048 次查看

Actually I want to find all local maxima and minima of a noisy signal (without any curve fitting).

So, first I use the Peak Detector and a threshold value (8 in the figure) to isolate all the peaks. Then I need to find the maximum/ minimum in each chunk of data 

separately.How do I do this ? So, the only meaningful imformation is the big gap between the chunks (whose size I call  "minimum increment").

0 项奖励
7 条消息(共 11 条)
4,035 次查看

The results of Peak Detector is also Array and if you Know the index between peaks that is zero crossing in your case then search for maximum peaks between a zero crossing.

Labview user
0 项奖励
8 条消息(共 11 条)
4,031 次查看

Yes, but my actual data is all positive and the y-axis (amplitude) is not fixed nor is its mid point. In this case the only

useful information is x-axis gap between the chunks.

In the picture, the data is computer generated. 

0 项奖励
9 条消息(共 11 条)
4,021 次查看

Take RMS or average of data and try to threshold with that value.

Labview user
0 项奖励
10 条消息(共 11 条)
4,009 次查看