You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+33-33Lines changed: 33 additions & 33 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,77 +18,77 @@ using StochasticDiffEq
18
18
α=1
19
19
β=1
20
20
u₀=1/2
21
-
f(u,p,t) = α*u
22
-
g(u,p,t) = β*u
21
+
f(u, p, t) = α*u
22
+
g(u, p, t) = β*u
23
23
dt =1//2^(4)
24
-
tspan = (0.0,1.0)
25
-
prob =SDEProblem(f,g,u₀,(0.0,1.0))
26
-
sol =solve(prob,SRIW1())
24
+
tspan = (0.0,1.0)
25
+
prob =SDEProblem(f, g, u₀,(0.0,1.0))
26
+
sol =solve(prob,SRIW1())
27
27
```
28
28
29
29
The options for `solve` are defined in the [common solver options page](https://diffeq.sciml.ai/stable/basics/common_solver_opts/) and are thoroughly explained in [the ODE tutorial](https://diffeq.sciml.ai/stable/tutorials/ode_example/).
30
30
31
31
That example uses the out-of-place syntax `f(u,p,t)`, while the inplace syntax (more efficient for systems of equations) is shown in the Lorenz example:
Colored noise can be set using [an `AbstractNoiseProcess`](https://diffeq.sciml.ai/stable/features/noise_process/). For example, we can set the underlying noise process to a `GeometricBrownianMotionProcess` via:
70
70
71
71
```julia
72
72
μ =1.0
73
73
σ =2.0
74
-
W =GeometricBrownianMotionProcess(μ,σ,0.0,1.0,1.0)
74
+
W =GeometricBrownianMotionProcess(μ, σ, 0.0,1.0,1.0)
75
75
# ...
76
76
# Define f,g,u0,tspan for a SDEProblem
77
77
# ...
78
-
prob =SDEProblem(f,g,u0,tspan,noise=W)
78
+
prob =SDEProblem(f, g, u0,tspan,noise=W)
79
79
```
80
80
81
81
StochasticDiffEq.jl also handles solving random ordinary differential equations. This is shown [in the RODE tutorial](https://diffeq.sciml.ai/stable/tutorials/rode_example/).
0 commit comments