MATLAB Answers

Integration of a curve from matrix

4 views (last 30 days)
Eric  Valois
Eric Valois on 11 Jun 2017
Hi Everyone, I am trying to integrate a scatter plot of some data. The data is in a matrix where column 1 and 3 are the x coordinates for 2 and 4 respectively. The curves represent an in run and out run. I believe that I am supposed to use trapz(X,Y) to integrate but I am getting negative values in one data set but not the other. For the ForceCurveCoreMilliQ the IntegralExt is negative but in ForceCurveCoreSW the IntegralExt is positive. As you can see from the generated curves, all the Y values are positive so the integration should generate a positive value. Can someone take a look at this and find my error. I have attached the two data sets and the code I have been using.


Sign in to comment.

Answers (0)

Community Treasure Hunt

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

Start Hunting!