Updated and fixed matlab interface