function x = RK4( fun, tspan, ci, mu ) %RK4 4th-order Runge Kutta integrator % Detailed explanation goes here h=1e-5; t=tspan(1); T=tspan(length(tspan)); dim=length(ci); %x=zeros(l,dim); x(:,1)=ci; i=1; while t