Changed matrix inputs in ODE to only require immutable matrices