Within the function written for ode45 in MATLAB, I need to use the past outputs to calculate new data. Does anyone know how I can do that? Because the outputs that I can access currently are the most recent ones and I could not access the ones in the past until the whole solution is finally generated in the workspace.