How to set proper configuration to obtain peaks of my data
10 views (last 30 days)
Andriy Voshchenko on 23 Jun 2022
I want to extract peaks from my response spectrum for the future modal combination alalysis. My spectras have the following image if I use findpeaks command (this graphic is pretty dominant for one frequency, some others may have different form)
I´ve considered using the next settings:
In this case the results are the following which is what I actually want
Nevertheless, if I change the previous line slightly changing the peak distance I no longer capture the main peak
Instead it captures one of the first peaks of the data. My question is, how can I configure it so it only captures one peak for a certain X interval and this peak always being the highest value there? As I already mentiones, I have quite a few data sets to analyze and I´d like to make it less manual and avoid changing settings for each case.
Star Strider on 23 Jun 2022
It would help to have some representative data.
However, since the data are resonances, and the desired result seems to indicate that the peaks are possibly integer harmonics of the greatest peak, one way to approach this is first to take tha max of the data (returning the maximum and its index), and then use the x-value of the maximum (or the index of the maximum, depending on your findpeaks call) to set the 'MinPeakDistance' parameter, perhaps a 90% or so of the x-value or the index value. (Using 'MinPeakProminence' to define the peaks in noisy data might also be an option, however the data do not appear to have much noise. It would be necessary to experiment with that option.)
This involves finding the maximum and its index before calling findpeaks, however that might be the easiest way to get the desired result.