Samples/Examples:

vvmult.f is a simple, sample MEX file that performs vector multiplication. There are also versions that demonstrate the use of ALLOCATABLE (vvmult.f90) and POINTER (vvmult_ptr.f90) in building gateway functions (See here for more info). There are also versions that use IMSL (vvmult_imsl.f90) MKL (vvmult_mkl.f90) and CXML (vvmult_cxml.f90) (See here for more info)

times_imsl.f90.txt is an simple example of using the IMSL numerical libraries in an F90 MEX file. (See FAQ 8 for info on using IMSL libraries, see FAQ 3 for information on using F90 MEX files.)

matmult.f.txt is a simple Fortran 77 MEX file that demonstrates the writing of a MEX file using inputs with unknown dimensions.

TIMES.F90.TXT is a simple example of an F90 MEX file that uses ALLOCATABLE arrays.

Useful Code:

ARMAFILTER.F is a Fortran 77 MEX file that implements an ARMA(P,Q) filter for Matlab. There is also a Fortran90 version, and an m-file version to accompany it.