So as we all know, findpeaks will return the value of a peak using, e.g.,
[pks locs] = findpeaks(data, x);
My question is, how can I determine the value of the peaks when the function is changing? Normally I could just subtract the height of the function to get just the amplitude of the peaks, discounting the remainding function but now I can't because the function is decreasing.
I suppose my question is, how can I subtract a arying background from my peaks, i.e., isolate their true amplitude if that makes sense?