updated latex, minor fixes in Matlab code.