Does anyone know a trick to pass variables computed in the user defined function called by ODE45 in MATLAB?
For example, imagine you have the following code:
%=======================================
[t,y] = ode45('DiffEQ',dt,Initial,options);
function dy = DiffEQ(t,y)
Fc = y(1)*y(2)...