Re: Linear interpolation
- To: mathgroup at smc.vnet.net
- Subject: [mg18059] Re: [mg18041] Linear interpolation
- From: "Kevin J. McCann" <kevinmccann at Home.com>
- Date: Tue, 15 Jun 1999 01:43:21 -0400
- Delivery-date: Tue Jun 15 06:30:29 1999
- References: <199906121952.PAA05754@smc.vnet.net.>
- Sender: owner-wri-mathgroup at wolfram.com
You need to use Interpolation with the option InterpolationOrder->1. Example below. The default InterpolationOrder is 3. Kevin Example: data = N[Table[{x, Sin[x]}, {x, 0, Pi, Pi/4}]] p1 = ListPlot[data, PlotStyle -> {AbsolutePointSize[4]}]; f3 = Interpolation[data] (* default uses 3rd order poly *) f1 = Interpolation[data, InterpolationOrder -> 1](* this one does linear interpolation *) p2 = Plot[f1[x], {x, 0, Pi}]; p3 = Plot[f3[x], {x, 0, Pi}]; Show[p1, p2, p3]; ----- Original Message ----- From: Eric <lazzaree at tcd.ie> To: mathgroup at smc.vnet.net Subject: [mg18059] [mg18041] Linear interpolation > > Hi all, > > which software allows, if we give it 2 series of data (temperature on time > in my case), to calculate Y for any X, using a linear interpolation, and how > ? Actually, I have a serie of data for different sample with an irregulate > step and I want to compare them. So I need to interpolate them. > > Thank you for any help. > > Eric > >