This chapter describes how to write MEX-files in the C programming language.
Computations can be numerical computations as well as inputting and outputting data.
The gateway calls the computational routine as a subroutine. In the gateway routine, you can access the data in the mxArray structure and then manipulate this data in your C computational subroutine. After calling your C computational routine from the gateway, you can set a pointer of type mxArray to the data it returns.