Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
1999
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 1999

[Date Index] [Thread Index] [Author Index]

Search the Archive

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





  • Prev by Date: Linear algebra
  • Next by Date: RE: How to print a determinant in the traditional way
  • Previous by thread: Re: interpolatingfunction
  • Next by thread: Re: interpolatingfunction