User`s guide

2 Installation and Configuration
2-10
On UNIX, MEX-files are created with platform-specific extensions, as shown in
Table 2-2, MEX-File Extensions for UNIX.
The
<matlab>/extern/examples/mex directory contains C source code for the
example
yprime.c. After you copy the source file (yprime.c) to a local directory
and
cd to that directory, enter at the MATLAB prompt
mex yprime.c
This should create the MEX-file called yprime with the appropriate extension
corresponding to your UNIX platform. For example, if you create the MEX-file
on Solaris, its name is
yprime.mexsol.
You can now call
yprime from the MATLAB prompt as if it were an M-function.
For example:
yprime(1,1:4)
ans =
2.0000 8.9685 4.0000 -1.0947
If you encounter problems generating the MEX-file or getting the correct
results, refer to External Interfaces/API in the MATLAB documentation for
additional information about MEX-files.
Table 2-2: MEX-File Extensions for UNIX
Platform MEX-File Extension
Dec/Compaq Alpha mexaxp
HP 9000 PA-RISC mexhp7
HP-UX
mexhpux
IBM RS/6000 mexrs6
Linux mexglx
SGI mexsg
Solaris mexsol