printing for matlab wrapper