Skip to content

Commit dbd2dc5

Browse files
committed
Clean up my own mess
1 parent 597a56b commit dbd2dc5

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

docs/src/tutorials/nonlinear.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,12 @@ using ModelingToolkit, NonlinearSolve
1212
# Define a nonlinear system
1313
@variables x y z
1414
@parameters σ ρ β
15-
@mtkbuild ns = NonlinearSystem([
16-
0 ~ σ * (y - x)
17-
0 ~ x * (ρ - z) - y
18-
0 ~ x * y - β * z
19-
])
15+
eqs = [0 ~ σ * (y - x)
16+
0 ~ x * (ρ - z) - y
17+
0 ~ x * y - β * z]
18+
guesses = [x => 1.0, y => 0.0, z => 0.0]
19+
ps = [σ => 10.0, ρ => 26.0, β => 8 / 3]
20+
@mtkbuild ns = NonlinearSystem(eqs)
2021
2122
guesses = [x => 1.0, y => 0.0, z => 0.0]
2223
ps = [σ => 10.0, ρ => 26.0, β => 8 / 3]

0 commit comments

Comments
 (0)