Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2010

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

Search the Archive

Re: ODE solution transfer

  • To: mathgroup at smc.vnet.net
  • Subject: [mg111440] Re: ODE solution transfer
  • From: Themis Matsoukas <tmatsoukas at me.com>
  • Date: Sun, 1 Aug 2010 04:58:19 -0400 (EDT)

When you executed 

fvars=vars/.NDSolve[deqns,vars,{t,start,end}][[1]]
{InterpolatingFunction[{{0.,10.}},<>][t],InterpolatingFunction[{{0.,10.}},<>][t]}

you replaced the previous definition of favrs (which was  fvars = {a[t_],b[t_]})  with the result of NDSolve. Your solutions now are in fvars[[1]] and fvars[[2]

I am not sure what you are trying to accomplish by setting fvars = {a[t_],b[t_]}. This involves as much typing as

fvars=vars/.NDSolve[deqns,vars,{t,start,end}][[1]]
{SolvedA[t_],SolvedB[t_]}=fvars

By the way, I would recommend that you use a different variable for the solved form of a[t and b[t]. Otherwise, if you execute the notebook a second time, the solved values of a,b, will be used inside NDSolve and you will get unexpected results.

Themis


  • Prev by Date: classroom combinatorics
  • Next by Date: Re: Cannot load example data
  • Previous by thread: Re: classroom combinatorics
  • Next by thread: Re: ODE solution transfer