Using variables from previous iterations

Hi!
I was wondering if, after computing a state variables’ derivative at time time step t, I can use it at time step t+1.
For example, if one of my state variables is speed V, is there a way to use V_dot as my computed acceleration in the next iteration?
Ain’t it maybe what algebraic states are used for?
Many thanks!

Hi,

I you can do something like this using an RTI loop and setting values from the last iteration as parameters.
I also just added a way to do it efficienlty with a custom C function:

Cheers,
Jonathan