User`s guide
2 Installation and Configuration
2-24
Note Before you test to see if the Compiler can generate MEX-files from the
DOS command prompt, you may want to delete the MEX-file you created in
the previous section,
invhilb.dll. That way, you can be sure your newly
generated MEX-file is the result of using the Compiler from the DOS prompt.
To delete this file, you must clear the MEX-file or quit MATLAB; otherwise
the deletion will fail.
Copy
invhilb.m from the <matlab>\toolbox\matlab\elmat directory to a local
directory and then type the following at the DOS prompt.
mcc -x invhilb
Next, verify that invhilb is now a MEX-file by listing the invhilb files:
dir invhilb*
You will see a list containing
invhilb.c
invhilb.dll
invhilb.h
invhilb.m
invhilb_mex.c
These are the files that the Compiler generates from the M-file, in addition to
the original M-file,
invhilb.m. The Compiler-generated MEX-file appears in
the list as the filename followed by the extension,
dll. In this example, the
Compiler creates the file
invhilb.dll. For more information on which files the
Compiler creates for a compilation, see Chapter 5, “Controlling Code
Generation.”
To test the newly created MEX-file, you would start MATLAB and, at the
MATLAB prompt, you could type
invhilb(10)