Skip to content

Commit d0adb64

Browse files
fix up tutorial ending
1 parent dacb8b0 commit d0adb64

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

docs/src/examples/min_and_max.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,8 @@ Let's add the maxima and minima to the plots:
8787

8888
```@example minmax
8989
plot(sol, vars=(0,4), plotdensity=10000)
90-
scatter!([opt.minimizer],[opt.minimum],label="Local Min")
91-
scatter!([opt2.minimizer],[-opt2.minimum],label="Local Max")
90+
scatter!([opt.u],[opt.minimum],label="Local Min")
91+
scatter!([opt2.u],[-opt2.minimum],label="Local Max")
9292
```
9393

9494
### Global Optimization
@@ -102,14 +102,14 @@ swap out to one of the
102102
Let's try `GN_ORIG_DIRECT_L`:
103103

104104
```@example minmax
105-
opt = solve(optprob, NLopt.GN_ORIG_DIRECT_L())
106-
opt2 = solve(optprob, NLopt.GN_ORIG_DIRECT_L())
105+
gopt = solve(optprob, NLopt.GN_ORIG_DIRECT_L())
106+
gopt2 = solve(optprob, NLopt.GN_ORIG_DIRECT_L())
107107
108-
@show opt.u, opt2.u
108+
@show gopt.u, gopt2.u
109109
```
110110

111111
```@example minmax
112112
plot(sol, vars=(0,4), plotdensity=10000)
113-
scatter!([minx],[minf],label="Global Min")
114-
scatter!([maxx],[maxf],label="Global Max")
113+
scatter!([gopt.u],[gopt.minimum],label="Global Min")
114+
scatter!([gopt2.u],[-gopt2.minimum],label="Global Max")
115115
```

0 commit comments

Comments
 (0)