You have three state variables, namely v, lc, and z. But you only have code for updating v. You need code for updating lc and z also. You have a couple of choices. Either have three function handles like this:
f=@(t,v,lc,z) (code for vdot here)
g=@(t,v,lc,z) (code for lcdot here)
h=@(t,v,lc,z) (code for zdot here)
Or you could create a single vector function handle to contain all three derivatives:
You would need to fill in the code for vdot, lcdot, and zdot. Looks like maybe the code you currently have for f only has the derivative for vdot, but you need all three.
Then you need to modify the code in your loop to handle these extra variables also. How you modify your looping code will depend on which choice you make for your derivative functions.