Skip to content

Commit cbd9f59

Browse files
authored
Update SampledData.md
1 parent 2a29c7e commit cbd9f59

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

docs/src/tutorials/SampledData.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@ A few things to note in this basic example:
3636

3737
```julia
3838
function discrete_step(x, u)
39-
y = x # y is assigned the old value of x
40-
x = 0.5x + u # x is updated to a new value
41-
return x, y # The state x now refers to x at the next time step, while y refers to x at the current time step
39+
y = x # y is assigned the current value of x, y(k) = x(k)
40+
x = 0.5x + u # x is updated to a new value, i.e., x(k+1) is computed
41+
return x, y # The state x now refers to x at the next time step, x(k+1), while y refers to x at the current time step, y(k) = x(k)
4242
end
4343
```
4444

@@ -150,4 +150,4 @@ connections = [
150150
p.y ~ c.y] # plant output to controller feedback
151151
152152
@named cl = ODESystem(connections, t, systems = [f, c, p])
153-
```
153+
```

0 commit comments

Comments
 (0)