MathGroup Archive 2000

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

Search the Archive

Re: Experimental data as function?

  • To: mathgroup at
  • Subject: [mg25766] Re: Experimental data as function?
  • From: "Allan Hayes" <hay at>
  • Date: Sat, 21 Oct 2000 18:33:01 -0400 (EDT)
  • References: <8ssqbe$>
  • Sender: owner-wri-mathgroup at

Make an interpolating function:

data = Table[{x, Sin[x]}, {x, 0, 2Pi, Pi/50}];

sin = Interpolation[data]

InterpolatingFunction[{{0, 2 Pi}}, <>]

NIntegrate[sin[x], {x, 0, 2.57}] (*don't use Integrate*)


NIntegrate[Sin[x], {x, 0, 2.57}]


Plot[{sin[x], sin'[x]}, {x, 0, 2Pi}]

Allan Hayes
Mathematica Training and Consulting
Leicester UK
hay at
Voice: +44 (0)116 271 4198
Fax: +44 (0)870 164 0565

"Eric Sommer" <erso at> wrote in message
news:8ssqbe$19n at
> Hi,
> I have measured an experimental curve and the data are available as
> (x,y=f(x)) ASCII data pairs. I would like to use this curve as a
> function that I can insert, for example, in calculations, or that I can
> integrate. It should work in the way that for a given x, the measured y
> value will be taken.
> I found methods to import data as lists, but could not find any hint to
> use them as a function.
> Is there a possibility to create such a function with Mathematica? How
> can it be done? What will happen, e.g. for an integration, when x values
> appear that were not measured?
> Thank you,
> Eric Sommer

  • Prev by Date: Re: Contour Plots
  • Next by Date: Re: Using results of "Solve"
  • Previous by thread: Experimental data as function?
  • Next by thread: No pictures/diagrams in help