export routines to matlab