MathGroup Archive 2003

[Date Index] [Thread Index] [Author Index]

Search the Archive

RE: numerical integration

  • To: mathgroup at smc.vnet.net
  • Subject: [mg40590] RE: [mg40536] numerical integration
  • From: "David Park" <djmp at earthlink.net>
  • Date: Thu, 10 Apr 2003 03:43:44 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

There seems to be an error in the typing of your data. You have a square
bracket instead of a curly bracket. Did you copy and paste it from your
notebook? In any case, I repeat it here.

data = {{0, 4.308115176}, {180, 11.83807029}, {320, 9.819597477}, {380,
      9.003587475}, {420, 9.646700866}, {540, 9.003587475}, {660,
      8.601966768}, {720, 8.090496405}, {780, 7.49290292}, {900,
      7.536283436}, {1020, 7.086922454}, {1080, 6.876137912}, {1140,
      6.580371983}, {1200, 6.430040607}, {1320, 6.300111915}, {1380,
      6.077755024}, {1500, 6.101258682}, {1680, 5.96360292}, {1800,
      5.821356082}};

ListPlot[data, PlotJoined -> True,
    PlotRange -> All];

Needs["NumericalMath`NIntegrateInterpolatingFunct`"]

First make an interpolating function for the data. I used a first order
interpolation. You might want some other choice.

f = Interpolation[data, InterpolationOrder -> 1]
InterpolatingFunction[{{0., 1800.}}, "<>"]


NIntegrateInterpolatingFunction[f[x], {x, 0, 1800}]
13701.4

David Park
djmp at earthlink.net
http://home.earthlink.net/~djmp/


From: C B [mailto:cbhat at purdue.edu]
To: mathgroup at smc.vnet.net

I have data which looks like ..

data = {{0,4.308115176},{180,11.83807029},{320,9.819597477},{380,
9.003587475},{420,9.646700866},{540,9.003587475},{660,
8.601966768},{720,8.090496405},{780,7.49290292},{900,7.536283436},{1020,7.08
6922454},{1080,6.876137912},{1140,
6.580371983},[1200,6.430040607},{1320,6.300111915},{1380,
6.077755024},{1500,6.101258682},{1680,5.96360292},{1800,5.821356082}}


X value is time (sec)
Y value is gas readings
I could plot the XY plot but I need to get area under the curve. For that I
tried
<<NumericalMath`NIntegrateInterpolatingFunct`
Interpolation
NIntegrateInterpolatingFunction

But I am just not being able to figure out the exact sytax. Does anyone have
any experience with this kind of problem?





  • Prev by Date: Re: split a list
  • Next by Date: Re: split a list
  • Previous by thread: Re: numerical integration
  • Next by thread: Re: numerical integration