add: finish matlab functions