Preparing for matlab script