04-22-2020 05:14 PM
04-22-2020 11:30 PM
You were close to finding peaks, then need to sort, and keep the 5 largest. There are more elegant ways to do this, but here's one that follows your start (which was close to working).
I've also included a VI to do an alternative peak detection, which you might use to suppress unwanted side peaks without resorting to smoothing you just need to decide a peak must be > delta_Y from surrounding pts.
I've tested some of your data and it definitely works, though the parameters required vary from dataset to dataset.
Sorry I worked on the 2016 version in LabVIEW 2019 but used sort 2D array before realizing its not backwards compatible and couldn't back save.
Craig