Re: Function interpolation

*To*: mathgroup at smc.vnet.net*Subject*: [mg45374] Re: Function interpolation*From*: "Jean.Pellegri" <Jean.Pellegri at wanadoo.fr>*Date*: Sun, 4 Jan 2004 04:56:06 -0500 (EST)*References*: <bt0uc8$hec$1@smc.vnet.net>*Sender*: owner-wri-mathgroup at wolfram.com

"Fernando Ronci" <fernandoronci at hotmail.com> a écrit dans le message de news:bt0uc8$hec$1 at smc.vnet.net... > Hi, > > I'm new to Mathematica and need some hints on how to derive (or > estimate) a function from a given set of discrete x/y values. > I know Mathematica can do this but I don't know how. > For example, I tried to create a table of x/y values, then assign the > approximated funcion to 'newfunction' and test it by calling it with > 2.3 as argument, but it failed as follows (I couldn't even figure out > how to build the table): > > Table = [{0, 0}, {1, 2}, {2, 4}, {3, 8}, {4, 16}, {5, 32}] > newfunction = Interpolation[%] > newfunction[2.3] In[4]:= f=Interpolation[{{0, 0}, {1, 2}, {2, 4}, {3, 8}, {4, 16}, {5, 32}}] Out[4]= InterpolatingFunction[{{0,5}},<>] In[7]:= f[3.4] Out[7]= 10.496 In[6]:= f'[3.4] Out[6]= 7.25333 Salut -- < Jean Pellegri > "fortitudo mea in rota" F - 93100 Montreuil I - 54023 Filattiera