How to return values for all internally defined time steps by odeint in python
You get this functionality with scipy.integrate.solve_ivp or by fashioning your own time loop using the stepper classes, the old ode class or the new RK45, Radau, LSODA etc.
Note that in Matlab the option parameter 'Refine' is set to the default value 4, so that for every internal step there are 3 interpolated points added so that the output looks curved despite large time steps due to the step size control. This trick is not present in the python routines, you would have to enrich the output yourself.
I am using odeint in scipy to integrate a function. The function is basically the velocities in x,y,z directions which I need to integrate to find the corresponding x,y,z position coordinates. Odeint in python asks for a list of timesteps and return values for those number of timesteps only. But, I require all values of x,y,z coordinate positions calculated at each internally defined timestep and not just at the timesteps I send as a parameter. So, is there a way to just send the min and max timestep and get all the values calculated at each internally defined timestep between the given min and max timestep?
The reason I need this is that when I plot the x,y,z coordinates returned, I am getting sharp turns and not smooth paths. So, in order to plot a smooth path, I will require all the coordinates calculated at each internally defined timestep.
If I am not wrong, the ODE45 function in Matlab returns all values calculated at every automatically defined internal timestep. Is there a way to get this to work in python?