| Author |
Comment/Response |
John Barber
|
10/29/01 10:45am
Thanks!
Actually, I think the random function CAN be defined numerically in advance. Since
Random[NormalDistribution[0,Sqrt[1/(1+q[t]^2)]]]
is statistically the same as
Random[NormalDistribution[0,1]]/Sqrt[1+q[t]^2],
I can write my set of ODE's as:
q'[t]==p[t]
p'[t]==-(1+ (Q[t]^2)/(1+q[t]^2))q[t]
where Q[t]=Random[NormalDistribution[0,1]] at each instant in time.
I generated Q[t] in advance by creating a table of such random numbers at many time values, and then invoking Interpolation[...]. The solutions generated look just like those in the attachement of the above reply, but NDSolve only needs to be called once. See this attached notebook.
Attachment: StochasticODE.nb, URL: , |
|