How to calculate area under a "big" peak?
1 view (last 30 days)
Show older comments
Hello. I have some dat that looks like this:
I want to find the area under the peak (red channel) but when I use the function findpeaks, what it returns is several little peaks:
Is there a way for Matlab to identify that the peak actually starts around pixel 40 and ends around pixel 180? And to then calculate the area under the peak between those values? Is there also a way to get an average of the "peak maximum values" (like in orange line in next graph)?
Thank you!
0 Comments
Answers (1)
John D'Errico
on 26 May 2017
Edited: John D'Errico
on 26 May 2017
Around 40? Around 180?
Fuzzy words like that are difficult to make work in a mathematical computation. You need to quantify exactly what the word means, and then write code that identifies the event.
I might suggest writing a code that identifies those regions where the data is well represented by a constant, so any new point added to a constant model falls outside of a prediction interval around that model. But even there, you will find regions where that will be problematic. It would help if you knew the noise in your data. My estimatenoise tool (on the file exchange) might be of service to you, as it tries to compute the noise level in a time series.
0 Comments
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!