Re: NDSolve output without interpolating function
- To: mathgroup at smc.vnet.net
- Subject: [mg124332] Re: NDSolve output without interpolating function
- From: "Scot T. Martin" <smartin at seas.harvard.edu>
- Date: Tue, 17 Jan 2012 03:24:10 -0500 (EST)
- Delivered-to: l-mathgroup@mail-archive0.wolfram.com
- References: <201201150952.EAA19696@smc.vnet.net>,<201201162209.RAA15364@smc.vnet.net>
Another "wow" from me. I hope the right person at Wolfram is listening. It would be really great to know about this additional functionality for NDSolve within its documentation, which is a great function that I have been using since 1994 (flattery to Wolfram!) and for which I am very keen to now learn about these additional possibilities (petition to Wolfram!). Please. ________________________________________ From: Oliver Ruebenkoenig [ruebenko at wolfram.com] Sent: Monday, January 16, 2012 17:09 To: mathgroup at smc.vnet.net Subject: [mg124332] Re: NDSolve output without interpolating function On Sun, 15 Jan 2012, Oleksandr Rasputinov wrote: > On Sat, 14 Jan 2012 22:21:47 -0000, Nasser M. Abbasi <nma at 12000.org> wrote: > >> On 1/14/2012 2:01 AM, Oliver Ruebenkoenig wrote: >>> On Fri, 13 Jan 2012, william cuervo wrote: >>> >>>> Hi! >>>> >>>> Is there any way that NDSolve presents the output as a set of data >>>> instead >>>> of as an interpolating function? >>>> >>>> >>>> Thanks! >>>> >>> >>> Hi, >>> >>> how about >>> >>> s = y /. First@ >>> NDSolve[{y'[x] == y[x] Cos[x + y[x]], y[0] == 1}, y, {x, 0, 30}] >>> >>> s["ValuesOnGrid"] >>> >>> s["Methods"] >>> >>> Oliver >>> >> >> Wow, that is amazing. Never knew about these. Any idea where to >> read more about these options? to understand more what they return >> and such. >> >> Sounds like they will be very useful to know about. nothing in >> documentation >> center on them. >> >> thanks >> --Nasser >> > > These have a rather unusual form of documentation that works as follows: > > s["MethodInformation"["ValuesOnGrid"]] > > prints: > > System`InterpolatingFunction`ValuesOnGrid > > InterpolatingFunction[domain, data]@ValuesOnGrid[] gives the function > values at each grid point. In some cases, this may be faster than > evaluating at each of the grid points. > > Attributes[System`InterpolatingFunction`ValuesOnGrid] = {Protected} > > Options[System`InterpolatingFunction`ValuesOnGrid] = {DropPeriodicEndpoint > -> False} > > (of course, you can substitute "ValuesOnGrid" for whatever Method you are > interested in.) > > I filed a suggestion that the documentation on "MethodInformation" be improved in the future. In general, I usually, try "Properties" and "Methods" on objects. Some of them offer additional functionality (while the one in this case can be accessed via the anatomy package (tutorial/NDSolvePackages#120436095)) Thanks, Oliver
- References:
- Re: NDSolve output without interpolating function
- From: "Oleksandr Rasputinov" <oleksandr_rasputinov@hmamail.com>
- Re: NDSolve output without interpolating function
- From: Oliver Ruebenkoenig <ruebenko@wolfram.com>
- Re: NDSolve output without interpolating function