Re: InterpolatingFunction[] question
- To: mathgroup at smc.vnet.net
- Subject: [mg7192] Re: [mg7150] InterpolatingFunction[] question
- From: penny at suu.edu (Des Penny)
- Date: Wed, 14 May 1997 01:11:28 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
>I'm currently using Mathemaitca to solve a tricky 2nd-order differential
>equation and am getting " InterpolatingFunction[{0,97.7}, <>] " as a
>result. What I'd like to do is to mark the 0 and the 97.7 as xmin and
>xmax respectively (i.e. assign to xmin the first number in braces, and
>assign to xmax the second number in braces). Is there any way to do
>this?
Hi Jack:
Is this what you want:
In: sol = NDSolve[{Derivative[1][y][x] == y[x], y[0] == 1}, y, {x, 0, 2}]
Out: {{y -> InterpolatingFunction[{{0.,2.}},"<>"]}}
In: min=sol[[1,1,2,1,1,1]]
max=sol[[1,1,2,1,1,2]]
Out: 0
2
Hope this helps.
Cheers,
Des Penny
-------------------------------
Des Penny
Physical Science Dept.
Southern Utah University
Cedar City, UT 84720
VOICE: (Office): (801) 586-7708
(Home) : (801) 586-2286
FAX: (801) 865-8051
e-mail: penny at suu.edu
-------------------------------