C C Takes a string and returns a string in reverse order. Below is the gateway routine that calls the computational routine. The input must be a string. The input must be a row vector. This is necessary on some C compilers.
C Call the computational subroutine.
After checking for the correct number of inputs, this MEX-file gateway routine verifies that the input was either a row or column vector string. It then finds the size of the string and places the string into a Fortran character array. Note that in the case of character strings, it is not necessary to copy the data into a Fortran character array by using mxCopyPtrToCharacter . In fact, mxCopyPtrToCharacter works only with MAT-files. For more information about MAT-files, see Importing and Exporting Data .