Re: interpolatingfunction
- To: mathgroup at smc.vnet.net
- Subject: [mg15892] Re: interpolatingfunction
- From: "Allan Hayes" <hay at haystack.demon.co.uk>
- Date: Wed, 17 Feb 1999 23:33:39 -0500
- References: <7a2bg1$1th@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
phpcp at csv.warwick.ac.uk wrote in message <7a2bg1$1th at smc.vnet.net>... > >hi all, > >i solved a d.e. using NDSolve and got a solution in >InterpolatingFunction form. How can i define this as a function that >returns values using an argument. > >thanks, >sanjay > > Sanjay: An expression InterpolatingFunction[...] behave as a function: NDSolve[{x'[t] == x[t], x[0]==1}, x,{t,0,1}] {{x -> InterpolatingFunction[{{0.,1.}},"<>"]}} f = x/.%[[1]] InterpolatingFunction[{{0.,1.}},"<>"] f[.3] 1.34986 Allan --------------------- Allan Hayes Mathematica Training and Consulting Leicester www.haystack.demon.co.uk hay at haystack.demon.co.uk Voice: +44 (0)116 271 4198 Fax: +44 (0)870 164 0565