I am going to program Eulers method in Octave to approximate gravity in 1-dimension. I understand the formula for Eulers method, which is equal to:
What I don't understand is what my function $f(t,y)$ is in this case. What do I have to insert into the formula to get my next $y$-point?



Depending on the scale, you have $$ \ddot x=a(t,x)=-g $$ or $$ \ddot x=a(t,x)=-\frac{GM}{(R+x)^2} $$ where $G$ is the gravitational constant, $M$ the mass of Earth and $R$ its radius.
As this is second order, a first order system would have the form $$ \binom{\dot x}{\dot v}=f(t,(x,v))=\binom{v}{a(t,x)}. $$