Re: Q: NDSolve

• To: mathgroup at smc.vnet.net
• Subject: [mg21576] Re: Q: NDSolve
• From: Bojan Bistrovic <bojanb at physics.odu.edu>
• Date: Sat, 15 Jan 2000 02:04:19 -0500 (EST)
• Organization: Old Dominion Universityaruba
• References: <85mmgb\$268@smc.vnet.net>
• Sender: owner-wri-mathgroup at wolfram.com

```Christoph Handel wrote:
>
>    howdy,
>
> is there a nice way to solve an equation like this:
>
> x'[t] == aMatrix[t] . x[t]
>
> where x ist a Vector.
>
> I tried something like this:
>
> NDSolve[{x'[t]== aMatrix[t] . x[t], x[0]=={1,2,3...}},x,{t,0,42}]
>
> Greetings
>         Christoph
> --
> for faster reply use handel at the same host

This might not be "a nice" way, but it works:

In[1]:=

In[2]:= MyEqual[arg1_==arg2_]:=

In[3]:= SetAttributes[MyApplyFunction,Listable]
In[4]:= MyApplyFunction[f_,t_]:=f[t]/;MyfunctionTest[f]
In[5]:= MyApplyFunction[f_,t_]:=f/;Not[MyfunctionTest[f]]
xx//.aa_List[t_]:>Map[MyApplyFunction[#1,t]&,aa]

In[10]:= x={{f1},{f2}};
In[11]:= A={{2, t},{t+3,5}};

In[12]:=
Map[Part[#1,1]&,x],{t,0,10}]

Out[12]:={{f1 -> InterpolatingFunction[{{0.,10.}},"<>"],
f2 -> InterpolatingFunction[{{0.,10.}},"<>"]}}

You'll probably want to modify MyfunctionTest to fit your needs.

Bye, Bojan

--
-------------------------------------------------------------
Bojan Bistrovic,                       bojanb at physics.odu.edu
Old Dominion University, Physics Department,      Norfolk, VA
-------------------------------------------------------------

```

• Prev by Date: Re: ReadList of Complex Numbers
• Next by Date: Re: Alternative cf format.
• Previous by thread: Q: NDSolve
• Next by thread: Re: Q: NDSolve