Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum: 'problem with the "interpolating function"' topicStudent Support Forum > General > Archives > "problem with the "interpolating function""

< Previous Comment | Next Comment >Help | Reply To Comment | Reply To Topic
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,

Subject (listing for 'problem with the "interpolating function"')
Author Date Posted
problem with the "interpolating function" Tomce 09/24/08 1:58pm
Re: problem with the Xavier 09/25/08 4:51pm
Re: Re: problem with the Tomce 09/26/08 04:47am
< Previous Comment | Next Comment >Help | Reply To Comment | Reply To Topic