Skip to content

Commit 2bdfe15

Browse files
Merge pull request #301 from ArnoStrouwen/patch-1
Patch 1
2 parents 033b67e + 276c783 commit 2bdfe15

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

docs/src/highlevel.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ Each operation builds an `Operation` type, and thus `eqs` is an array of
3434
analyzed by other programs. We can turn this into a `ODESystem` via:
3535

3636
```julia
37-
de = ODESystem(eqs)
37+
sys = ODESystem(eqs)
3838
```
3939

4040
This `ODESystem` can then be used to generate an `ODEProblem` by supplying the
@@ -122,7 +122,8 @@ We can use this to build a nonlinear function for use with NLsolve.jl:
122122
```julia
123123
f = eval(nlsys_func)
124124
du = zeros(3); u = ones(3)
125-
f(du,u,(10.0,26.0,2.33))
125+
params = (10.0,26.0,2.33)
126+
f(du,u,params)
126127
du
127128

128129
#=
@@ -307,7 +308,8 @@ sys = modelingtoolkitize(prob)
307308
Using this, we can symbolically build the Jacobian and then rebuild the ODEProblem:
308309

309310
```julia
310-
jac = eval(ModelingToolkit.generate_jacobian(de...)[2])
311+
jac = eval(ModelingToolkit.generate_jacobian(sys)[2])
312+
311313
f = ODEFunction(rober, jac=jac)
312314
prob_jac = ODEProblem(f,[1.0,0.0,0.0],(0.0,1e5),(0.04,3e7,1e4))
313315
```

0 commit comments

Comments
 (0)