my data is a table of 17439×3. With the lines being: time, displacement and force, respectively.
I Need all the corresponding values for time and displacement at the peak forces.
my code is
[pks] = findpeaks (-M2B{:,3},'MinPeakProminence',4);pks = -pks;idx = find(M2B{:,3} == pks(:,1);loc = M2B{:,2}(idx);
this does however not work, if i insert pks (1,1) it does work but i dont get it to work for all values. Can anybody help?
Best Answer