| Author |
Comment/Response |
Xavier
|
09/25/08 4:51pm
Hey,
Here is the right command you should write:
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, x, c}, {s, 0, s0}, Method -> "Shooting"];
and as you can see, only a detail changed: instead of a[s], x[s] and c[s], you must just specify the heads. Indeed, if you check what you get with your former syntax, you have rules like a[s]->InterpolatingFunction[...][s], what does not define a function really (s is a fixed pattern and does not correspond to a variable that can change).
I don't know if you got me (English problems !) but your new result for Rez will be a->InterpolatingFunction[...] what will be a function you can define on s0.
Hope it helps you.
Cheers,
Xavier
URL: http://zavou.zxr.fr, |
|