Skip to content

Commit c35c3e1

Browse files
authored
Merge pull request #342 from JuliaControl/update_mtk_manual
doc: debug plant parameter vector in `MTK` example of the manual
2 parents bec06fe + 841cbf2 commit c35c3e1

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name = "ModelPredictiveControl"
22
uuid = "61f9bdb8-6ae4-484a-811f-bbf86720c31c"
3-
version = "2.2.2"
3+
version = "2.2.3"
44
authors = ["Francis Gagnon"]
55

66
[deps]

docs/src/manual/mtk.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -117,12 +117,12 @@ Ts = 0.1
117117
model = setname!(NonLinModel(f!, h!, Ts, nu, nx, ny; p); u=vu, x=vx, y=vy)
118118
```
119119

120-
We also instantiate a plant model with a 25 % larger friction coefficient ``K``, which is
121-
the third element of `p`, as shown above:
120+
We also instantiate a plant model with a 25 % larger friction coefficient ``K``:
122121

123122
```@example 1
123+
i_K = findfirst(==("K"), string.(p_sym))
124124
p2 = copy(p)
125-
p2[3] = 1.25*p[3]
125+
p2[i_K] = 1.25*p[i_K]
126126
plant = setname!(NonLinModel(f!, h!, Ts, nu, nx, ny; p=p2), u=vu, x=vx, y=vy)
127127
```
128128

0 commit comments

Comments
 (0)