library for matlab code