Matlab Fortran MEX selftest

Here is a quick test to help ensure your system is properly setup to compile Fortran MEX Matlab programs.

  1. in terminal:

     cp /usr/local/MATLAB/R2014a/extern/examples/refbook/* /tmp/</code>
    
  2. in matlab:

     mex -setup -v FORTRAN
    
  3. in matlab:

     mex /tmp/timestwo.F
    

yields:

Building with 'gfortran'.
MEX completed successfully

Finally, in matlab:

timestwo(3)
ans = 6.0