This chapter describes how to write MEX-files in the Fortran programming language. This section discusses the specific elements needed in a Fortran MEX-file.
Computations can be numerical computations as well as inputting and outputting data.
The gateway calls the computational routine as a subroutine. The computational and gateway routines may be separate or combined. You can get information about an mxArray by passing this pointer to various API functions called Access Routines . These access routines allow you to get a native Fortran data type containing exactly the information you want, i.e., the size of the mxArray , whether or not it is a string, or its data contents. To use pointers properly, you must declare them to be the correct size.