Updated Matlab publishing funtions