From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <96076337821445.tru64-unix-managers.marc@archive.invalid> From: e_rossi () sonda ! cl (Enrique Rossi, Sop ! Comercial, SONDA S ! A ! ) Date: Wed, 14 Aug 1996 07:13:15 +0000 To: tru64-unix-managers Subject: SUMMARY: MEX-files from MATLAB of MATHWORKS X-MARC-Message: https://marc.info/?l=tru64-unix-managers&m=96076337821445 1. Herve DEMARTHE (CEA France) 2. Tim W. Janes 3. Mohammed Anwar Sayid 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.