MathGroup Archive 2005

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

Search the Archive

Re: NDSolve/InterpolatingFunction and vectors


Hi Jens,

Thanks for looking at my problem.  Your solution helped a lot and gives 
nearly the result I was wanting.  Its probably the best option 
available.  I'm still disappointed that Mathematica doesn't properly 
handle the "dimension" of InterpolatingFunctions.

Later,
Daniel


Jens-Peer Kuska wrote:
> Hi,
> 
> soln = NDSolve[{
> xx'[t] == {{0, 1}, {-1, 0}}.xx[t], xx[0] == {{0}, {1}}
> }, xx, {t, 0, 10}]
> 
> 
> 
> Needs["DifferentialEquations`NDSolveUtilities`"]
> 
> and
> 
> time = DifferentialEquations`NDSolveUtilities`Private`GetTimeData[soln];
> grid = First[
> DifferentialEquations`NDSolveUtilities`Private`GetGridData[soln]];
> ip1 = Interpolation[Transpose[{time, #[[1, 1, 1]] & /@ Transpose[grid]}]];
> ip2 = Interpolation[Transpose[{time, #[[1, 2, 1]] & /@ Transpose[grid]}]]
> 
> helps not ?
> 
> at least
> 
> Plot[{ip1[t], ip2[t]}, {t, 0, 10}]
> 
> work fine.
> 
> Regards
> 
>   Jens


  • Prev by Date: Re: programming in mathematica
  • Next by Date: Re: Where's the documentaion in Mac os X Mathematica 5.1?
  • Previous by thread: Re: NDSolve/InterpolatingFunction and vectors
  • Next by thread: compiling python 2.4 mathlink win32