How am I supposed to use non-diagonal noise when du is a matrix? When I run the example below I get:
BoundsError: attempt to access 2-element Array{Float64,1} at index [1, 2]
using DifferentialEquations, LinearAlgebra
f(du,u,p,t) = (du.=1.01*u)
function g(du,u,p,t)
du[1,1] = u[1]
du[1,2] = u[1]
du[2,1] = u[2]
du[2,2] = u[2]
end
Γ = zeros(4,4)
Γ[diagind(Γ)] .= 1
Γ[1,2] = .99
Γ[2,1] = .99
noise = CorrelatedWienerProcess!(Γ,0.,zeros(4),zeros(4))
prob = SDEProblem(f,g,ones(2),(0.,1.),[],noise=noise)
sol = solve(prob,EM(),dt=1/1000)