How can I integrate the area under a curve (from experimental data) with X & Y boundary conditions?
17 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
William From The Block
am 14 Sep. 2016
Kommentiert: Saurabh Parmar
am 25 Mai 2020
Hello,
How can I integrate the area under a curve (from experimental data) with X & Y boundary conditions?
My example is from chronoamperometry data (current vs time). Periodically the current will spike due to experimental conditions. I would like to integrate the area under a peak (ideally each peak) but I would like to set X & Y boundary conditions (?) so as to integrate a portion of the peak area [see attached image]. For example, in the image with green dots (my points to pick boundaries) I would like to integrate between (X1 & X2 and Y1 & Y2).
Using both trapz and cumtrapz functions, I haven’t been able to figure out how to get only my area of interest. Instead, I get the whole area under a peak [see other image with giant-"X"]. To date, the closest I’ve found to an answer appears to be from here: http://www.mathworks.com/matlabcentral/answers/122644-how-to-calculate-partial-area-under-the-curve However, I haven’t been able to figure out something that works with my data [attached].
0 Kommentare
Akzeptierte Antwort
KSSV
am 15 Sep. 2016
Use trapz....
check the link:
https://in.mathworks.com/matlabcentral/answers/154089-area-under-curve-no-function
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Numerical Integration and Differentiation finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!