How to calculate area under a "big" peak?
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Hello. I have some dat that looks like this:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/164528/image.png)
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:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/164530/image.png)
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)?
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/164532/image.png)
Thank you!
0 comentarios
Respuestas (1)
John D'Errico
el 26 de Mayo de 2017
Editada: John D'Errico
el 26 de Mayo de 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 comentarios
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!