@@ -41,9 +41,9 @@ with a sample time of `h` seconds.
```julia
for(i,t)=enumerate(0:h:duration)
@periodicallyhbegin
y[i]=measure(P)
r[i]=reference(t)
u[i]=control(i)
y[i]=measure(P)
r[i]=reference(t)
u[i]=control(i)
control(P,u[i])
end
end
...
...
@@ -57,8 +57,8 @@ Usage is demonstrated below
```julia
stateC=init_sysfilter(C)
function control(i)
e=r[i]-y[i]
u=sysfilter!(stateC,C,e)
e=r[i]-y[i]
u=sysfilter!(stateC,C,e)
end
```
`C` must here be represented by a [`StateSpace`](http://juliacontrol.github.io/ControlSystems.jl/latest/lib/constructors/#ControlSystems.ss) type from [`ControlSystems.jl`](https://github.com/JuliaControl/ControlSystems.jl).