Group Abstract Group Abstract

Message Boards Message Boards

Application of integration to a continuous list (xi,yi) of numbers; see nb.

In the attached nb. is an illustration of numerical integration. I have an error in the syntax; can someone help me find it.

thanks

Attachments:
4 Replies
POSTED BY: Frank Kampas
Posted 10 years ago

Hi Luke, As Sean points out, integrating an interpolating function for experimental data is questionable. There is the issue of what the interpolation has done between the data points. One way to restrict this is to use InterpolationOrder->1 in the function to cause NIntegrate to be getting something close to a trapezoidal rule. But questions still remain. One way to eliminate all questions is to just execute a known rule. For example, the user-defined function below performs numerical integration by the trapezoidal rule. It assumes the data is a list of x-y pairs, and is sorted by increasing x values. But that's all. There is no question about added information.

Best regards, David

trapezoidal[list_] := Total@Table[
   (list[[n, 1]] - 
      list[[n - 1, 1]]) (list[[n - 1, 2]] + list[[n, 2]])/2,
   {n, 2, Length[list]}
   ]
POSTED BY: David Keith

Sean,

Thanks for the reply.

I'm trying to integrate "raw data" from an experiment and there are numerous raw data inputs. The data are A1's and they are converted to C1's which I'm manipulating to integrate.

luke

POSTED BY: Sean Clarke
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard