ready for matlab code