LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

values of just the peaks of a chart

I have a chart with many peaks which are decreasing logarithmically e.g. 20 peaks, each one smaller than the previous one. I want to get the values of just the peaks.

Any suggestions???

Regards

Capillod
0 Kudos
Message 1 of 3
(2,284 Views)
Take the derivative of the array of data. Now you have a change in sign at each peak from + to -. Feed this array into a for loop with a shift register, and every iteration that the sign changes where Y[n]<0 and Y[n-1]>0 add the index to an array of ints that passes through another shift register. At completeion of the loop you will have an array of integers containing the indexes of every local peak.

Message Edited by billings11 on 05-16-2005 10:26 AM

-Devin
I got 99 problems but 8.6 ain't one.
0 Kudos
Message 2 of 3
(2,279 Views)
There are three peak samples in the Find examples when you search for peak. From the block diagram in the analyze, signal processing, time domain, threshold peak detector.vi and peak detector.vi.

Also in analyze, waveform monitoring, waveform peak detection.vi

Also in analyze, point by point, time domain ptbypt, peak detector ptbypt.vi and threshold peak detector ptbypt.vi

These vi's skew the actual location of the peak by a small amount from the actual x axis datapoints. If you need the exact x axis location, take the locations from the peak detection and split the original data then use the min/max array vi.
0 Kudos
Message 3 of 3
(2,258 Views)