function Flux.jacobian(ms::EnsembleVelSystem,x,testmode=true)
Flux.testmode!.(ms)
Flux.testmode!.(ms,testmode)
h=ms[1].sys.h
h=ms[1].sys.h
jacs=[[[Ih*Ih^2/2*eye(2)];Flux.jacobian(m,x)]forminms]# The h²/2*I in ∇ᵤ is an approximation since there are (very small) cross terms. TODO: hard coded sample time
jacs=[[[Ih*Ih^2/2*eye(2)];Flux.jacobian(m,x)]forminms]# The h²/2*I in ∇ᵤ is an approximation since there are (very small) cross terms. TODO: hard coded sample time
jacmat=cat(3,jacs...)
jacmat=cat(3,jacs...)
...
@@ -164,7 +183,7 @@ function all_jacobians(results, eval=false)
...
@@ -164,7 +183,7 @@ function all_jacobians(results, eval=false)