Re: Why polynomial Can't output as Number?
- To: mathgroup at smc.vnet.net
- Subject: [mg68983] Re: [mg68954] Why polynomial Can't output as Number?
- From: Bob Hanlon <hanlonr at cox.net>
- Date: Sat, 26 Aug 2006 02:04:17 -0400 (EDT)
- Reply-to: hanlonr at cox.net
- Sender: owner-wri-mathgroup at wolfram.com
Remove the semi-colon from the last statement. data={7,2,3,25,1,10}; f=InterpolatingPolynomial[data,x]; f/.x->5 1 Alternatively, Clear[f]; f[x_]=InterpolatingPolynomial[data,x]; f[5] 1 Plot[f[x],{x,0.95,Length[data]+0.05}, Epilog->{Red, AbsolutePointSize[4], Point/@Thread[{Range[Length[data]],data}]}]; Bob Hanlon ---- William wang <sunose at gmail.com> wrote: > data={7,2,3,25,1,10}; > f=InterpolatingPolynomial[data,x]; > f/.x->5; > > Result as attachment picture. > > why can't get a simply number? > > thanks >