Hi Garrett,
For all the methods for solving ODEs, the time as well as variable should change in steps. Considering the code snippet for the Euler method:
y(i+1)=y(i)-t*exp(y(i))*k
The right hand side of the equation contains multiplication of y(i) with vector t which gives us a vector but that is assigned to a scalar value y(i+1).The time values should also vary in steps with the functional value y(i). The following code snippet demonstrates the case where both time and functional value is varying:
y(i+1)=y(i)-t(i)*exp(y(i))*k
The same changes are applicable for the other techniques as well.
Hope this helps!
Regards,
Pratyush.