SUMMARY: MEX-files from MATLAB of MATHWORKS

From: Enrique Rossi, Sop. Comercial, SONDA S.A. <e_rossi_at_sonda.cl>
Date: Wed, 14 Aug 1996 03:13:15 -0400

1. Herve DEMARTHE (CEA France) <demarthe_at_alpha.cad.cea.fr>
2. Tim W. Janes <janes_at_signal.dra.hmg.gb>
3. Mohammed Anwar Sayid <sayid_at_signal.dra.hmg.gb>

Thanks for your answers, specially Anwar Sayid. The summary is:

MEX files are source code written in the high level languages C or Fortran.
Why?, because some operations are very slow in Matlab, e.g. For loops. If
speed is a problem MEX files can provide a solution, although you should try to
vectorise your Matlab code first. MEX files are relatively easy to write, have
a look in the Matlab External Interface Guide for examples.

The writing of MEX files on DEC UNIX should not be a problem, at least I'm not
aware of any. If you are going to program in C then be sure to use an ANSI C
compiler, one must be installed on your machine. You can use K&R C, however,
this will be outlawed in Matlab 5 and you'll have to rewrite your code.

There is an another product called the Matlab Compiler which converts your
M-files to C or Fortran automatically for speed-up. If you are using this
product then you should download the patch found at

ftp://ftp.mathworks.com/pub/tech-support/patch/compiler/mccexec.mexaxp

This MEX-file would replace the existing MEX-file in the
$MATLAB/toolbox/compiler directory (where $MATLAB refers to the MATLAB root
directory). I haven't evaluated the Compiler yet but my initial tests show it
to be working fine. Any problems you experience is likely to be a consequence
of the operating system and should be reported to MathWorks for solving.
Matlab 4.2c is not optimised for running on under DEC UNIX V.3.2 , hence the
need for the patch. I believe the Matlab V.5 will be fully compatible with DEC
UNIX V.3.2.
Received on Wed Aug 14 1996 - 18:13:57 NZST

This archive was generated by hypermail 2.4.0 : Wed Nov 08 2023 - 11:53:46 NZDT