| Author |
Comment/Response |
Tomce
|
09/24/08 1:58pm
I have a problem getting numerical values of interpolating function, which is a solution of a system of differential equations
here is a copy/paste of .nb file:
s0 = 0.25*Pi;
p0 = 0.1*Pi;
Rez = NDSolve[
{a''[s] == 0.5*c[s]*Sin[a[s]],
c'[s] == 0,
x'[s] == Cos[a[s]],
a[0] == 0,
a[s0] == p0,
a'[0] == 0,
x[0] == 0},
{a[s], x[s], c[s]},
{s, 0, s0},
Method -> "Shooting"
];
a[s0]
a[s0] /. Rez
a[s0] /. First[Rez]
a[N[s0]]
a[N[s0]] /. Rez
a[N[s0]] /. First[Rez]
N[a[s0]] /. Rez
N[a[s0] /. First[Rez]]
Evaluate[a[s0] /. Rez]
Plot[a[s] /. Rez, {s, 0, s0}]
Plot[x[s] /. Rez, {s, 0, s0}]
Plot[c[s] /. Rez, {s, 0, s0}]
Neither of
a[s0]
a[s0] /. Rez
a[s0] /. First[Rez]
a[N[s0]]
a[N[s0]] /. Rez
a[N[s0]] /. First[Rez]
N[a[s0]] /. Rez
N[a[s0] /. First[Rez]]
Evaluate[a[s0] /. Rez]
gives me numerical value of function a in point s0. The "Plot" command however successfully draws all three functions. Please help me.
P.S. I'm using Mathematica 6.0.
URL: , |
|