comparison of matlab and R code:
M, I, P, Ep match.  F appears transposed and shifted.  V, D differ substantially.  G not shown