Date: Apr 1, 2013 6:47 PM
Author: Derek Goring
Subject: Re: Integrating a data set and applying boundary conditions
On Tuesday, April 2, 2013 11:28:36 AM UTC+13, Anaheim wrote:

> Dear All,

>

>

>

> I have a matrix of bending moment data which I would like to double integrate over the length of a pile to obtain pile displacements using Matlab. I fit the bending moment data using polyfit and obtain regularly spaced values at small intervals using polyval.

>

>

>

> I can integrate these values using the trapz function but I need to apply 2 boundary conditions - displacement is a particular value at 2 discrete points - to solve for the 2 integration constants which I do not know how to do in Matlab.

>

>

>

> Also would double integration using trapz bring about significant errors?

>

>

>

> Any suggestions and help would be most welcome.

Won't it be a linear transformation:

C1*x + C2

where C1 is the constant from the 1st integration and C2 is from the 2nd.

So, you extract the solution at the requisite x locations and solve the two simultaneous equations for C1 and C2.

Numerical integration is fraught with problems if there is low frequency noise, and double integration makes it much worse. It's nothing to do with using trapz. Any algorithm will have the same problem. You may need to high-pass filter before integrating.