MATLAB Compiler    

MATLAB Compiler Verification

Verifying from MATLAB

Once you have verified that you can generate MEX-files on your system, you are ready to verify that the MATLAB Compiler is correctly installed. Type the following at the MATLAB prompt.

After a short delay, this command should complete and display the MATLAB prompt. Next, at the MATLAB prompt, type

The which command should indicate that invhilb is now a MEX-file by listing the filename followed by the appropriate UNIX MEX-file extension. For example, if you run the Compiler on Solaris, the Compiler creates the file invhilb.mexsol. Finally, at the MATLAB prompt, type

Note that this tests only the Compiler's ability to make MEX-files. If you want to create stand-alone applications, refer to Stand-Alone Applications for additional details.

Verifying from UNIX Command Prompt

To verify that the Compiler can generate MEX-files from the UNIX command prompt, you follow a similar procedure as that used in the previous section.

Copy invhilb.m from the <matlab>/toolbox/matlab/elmat directory to a local directory and then type the following at the UNIX prompt:

Next, verify that invhilb is now a MEX-file by listing the invhilb files:

You will see a list similar to this:

These are the various files that the Compiler generates from the M-file. The Compiler-generated MEX-file appears in the list as the filename followed by the appropriate UNIX MEX-file extension. In this example, the Compiler was executed on Solaris, so the Compiler creates the file invhilb.mexsol. For more information on which files the Compiler creates for a compilation, see Controlling Code Generation.

To test the newly created MEX-file, start MATLAB and, at the MATLAB prompt, type


  mex Verification Microsoft Windows on PCs