Averaging peaks from arrays of different lengths

1 view (last 30 days)
Hey everybody,
Long time reader, first time poster. I have a doozy of a problem. I have a series of data I collected using pressure sensors during different test conditions. For each test condition, I repeated the measurement four times. Here is a sample of the data -
From this data, I have located the pertinent peaks along with their location in the data set. I know would like to average the amplitude of the peaks for the four repetitions, as well as averaging their position. here is a plot of the peaks -
The problem I am currently encountering is that not all repetitions have the same number of peaks. How would I average the peaks magnitude (and their location)that are with a range from each other?
Just to make it clear, for each repetition I have one array with the amplitudes and a second array with the location of the peaks in the original data set.
Now, I could match and average the peaks manually, however bear in mind I have thousands of these to do.
Thanks in advance,
Rob
Edit---- To further clarify what the data means. I have a participant performing a certain task with a prosthetic hand. The data represents the pressure inside the socket. The peaks represent a specific action done by the participant. Unfortunately humans are not machine, so the action do not always line up. I need an average of the peaks for each individual action, so it is important which peaks get averaged.

Answers (2)

Image Analyst
Image Analyst on 14 Jul 2014
Why can't you just add together all the signals, and then find the peaks? Wouldn't that would pretty much give you the same thing?
  2 Comments
Roberto
Roberto on 14 Jul 2014
Correct me if I'm wrong, but if I add the signals, won't the amplitude increase?
Maybe I should further clarify what the data means. I have a participant performing a certain task with a prosthetic hand. The data represents the pressure inside the socket. The peaks represent a specific action done by the participant. Unfortunately humans are not machine, so the action do not always line up. I need an average of the peaks for each individual action, so it is important which peaks get averaged.
Image Analyst
Image Analyst on 14 Jul 2014
So if you have the peaks for each individual curve, why not just start there and "fall down" on either side of the peak until the curve turns around? That would be the width.

Sign in to comment.


Star Strider
Star Strider on 14 Jul 2014
In light of your comment, I would take the means and standard deviations of all the data for each experimental condition, especially if they are all measured at the same values of the x-variable, there the same numbers of repetitions in each experimental condition, and the sensors are calibrated. (If the x-coordinates aren’t the same, interpolating the data with respect to a common x-array would appear to me to be statistically valid, since the curves appear smooth.) This is an ensemble average, and is a common practice.
You may not have to identify all the peaks, simply the ones that in aggregate appear to be the most important. You may be able to set a magnitude threshold on them and identify only those that meet that criterion.

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!