I am new in Matlab and I am trying to move some part of a python code to my matlab script. I have a bit of problem finding the same functionaltiy of numpy library for matrices in matlab.
I was wondering what would be the equivalent of following lines of code in matlab:
gamma1 = 1. + np.sum(phi[:T-1,:], axis=1)
phi_cum = np.cumsum(phi[:0:-1,:], axis=0)[::-1,:]
gamma2 = alpha + np.sum(phi_cum, axis=1)
lV1 = np.vstack((lV1, 0.))
lV2 = psi(gamma2) - psi(gamma1 + gamma2)
lV2 = np.cumsum(np.vstack((0., lV2)), axis=0)