       Re: interpolatingfunction

• To: mathgroup at smc.vnet.net
• Subject: [mg15887] Re: [mg15855] interpolatingfunction
• From: "Kevin J. McCann" <kevinmccann at Home.com>
• Date: Wed, 17 Feb 1999 23:33:37 -0500
• Sender: owner-wri-mathgroup at wolfram.com

```Here is an example:

sol=NDSolve[{x''[t] + x[t] == 0,x==0,x'==1},x,{t,0,4Pi}][]
f=x/.sol
Plot[{f[t],f'[t]},{t,0,4\[Pi]}];

Note the [] at the end of the first line.  This does away with an
extra set of { }.

Second line defines f to be the InterpolatingFunction answer.

Third shows that you can plot it and even take its derivative. Try
{f,f',f''}.

Kevin

-----Original Message-----
From: phpcp at csv.warwick.ac.uk <phpcp at csv.warwick.ac.uk>
To: mathgroup at smc.vnet.net
Subject: [mg15887] [mg15855] interpolatingfunction

>
>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
>
>
>

```

• Prev by Date: RE: List manipulation question
• Next by Date: Re: QM,physics, mathematica