[t,x]=ode45(odefun,tspan,IC);
This attempts to call your odefun function with 0 input arguments and use the function handle it returns as the first input argument to ode45. If you want the first input argument to ode45 to be a function handle to odefun (you want ode45 to use odefun to evaluate the right-hand side of your system of ODEs), you need to add one character.
[t,x]=ode45(@odefun,tspan,IC);
Best Answer