List of variables in MAT-file
Pointer to an internal array containing pointers to the names of the mxArrays in the MAT-file pointed to by mfp. In C, each name is a NULL-terminated string. The num output argument is the length of the internal array (number of mxArrays in the MAT-file). If num is zero, mfp contains no arrays.
matGetDir returns NULL in C (0 in Fortran). If matGetDir fails, sets num to a negative number.
This routine provides you with a list of the names of the mxArrays contained within a MAT-file.
matGetDir allocates memory for the internal array of strings using a mxCalloc. You must free the memory using mxFree when you are finished with the array.
MATLAB® variable names can be up to length mxMAXNAM, defined in the C header file matrix.h.