added Matlab version of gauss_parse