How to shift curves and select appropriate peak y-axis values
1 view (last 30 days)
Show older comments
I have curves of experimental data (imported from spreadsheets) for which I have to compute the max y-axis values and the delta time on the x-axis. For each test condition I have perfomed at least 3 experiments.
1) The first problem is that while the peak values and the delta times are similar, the curves have a time shift (i.e. the Y-axis peak is occurring earlier or later), so I cannot simply compute the average in Excel, since this time-shift would affect the mean values and delta time computation (e.g. the curves would look "wider").
I know how to import the spreadsheets data, but how can organize the data in Matlab in order to avoid the effect of the time shift?
2) Then the second problem is due to the fact that the Y-axis peak is not always on the one that I am looking for, but sometimes it just occurs at the beginning of the experiment, while I am looking at a later time peak value. How can I select it? Note that the starting Y-values are sometimes smaller than zero.
I am attaching a sample Excel file with numerical test results.
And here I am also attaching a figure for one single test result to be more clear.

0 Comments
Answers (1)
Greg Dionne
on 29 Jun 2016
If you have a relatively recent copy of the Signal Processing Toolbox, have a look at the function "findpeaks". Try setting the 'MinPeakProminence' to something like 20, and 'MinPeakWidth' to something like 1e-5 (if you use a time vector) or maybe 50 samples or so. That should give you the location of the peak.
To get the value of the DC location of the signal in the pre-event area, you could try finding the median value in the region immediately preceding the peak.
Once you have that you can use "find" to find the first occurrence where it jumps from the median value + some threshold.
See Also
Categories
Find more on Spreadsheets in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!