From: Celine on
I want to write a program that uses the symbolic math toolbox to manipulate a function (differentiate, add/multiply) to create several new expressions which I want to solve numerically (ode45?).

for example:
f = xdot = ax / b+x

Manipulation:
gdot = g* df/dx + df/da
hdot = h* df/dx + df/db

System Matrix:
z = [f; gdot; hdot]

then, I want to solve (simultaneously):
ode45(z, [0,10], [0;0;0])

How can I convert the symbolic expressions to... whatever I need for the ode function?

Thanks in advance for your advice!
Celine
From: Nazeer on
Hi Celine !
After symbolic manipulation, write the expressions in another file and clear all symbolic variables then read back the expressions which can be used for numerical evaluation using RK45 (ode45) etc.

"Celine " <celine_sin.removethis(a)hotmail.com> wrote in message <hrfqgv$9l8$1(a)fred.mathworks.com>...
> I want to write a program that uses the symbolic math toolbox to manipulate a
function (differentiate, add/multiply) to create several new expressions which I want to solve numerically (ode45?).
>
> for example:
> f = xdot = ax / b+x
>
> Manipulation:
> gdot = g* df/dx + df/da
> hdot = h* df/dx + df/db
>
> System Matrix:
> z = [f; gdot; hdot]
>
> then, I want to solve (simultaneously):
> ode45(z, [0,10], [0;0;0])
>
> How can I convert the symbolic expressions to... whatever I need for the ode function?
>
> Thanks in advance for your advice!
> Celine