There is MATLAB code for an example, hello.m, included in the <matlab>\extern\examples\compiler directory. To verify that the MATLAB Compiler can generate stand-alone applications on your system, type the following at the MATLAB prompt.
This command should complete without errors. To run the stand-alone application, hello, invoke it as you would any other Windows console application, by typing its name on the MS-DOS command line. The application should run and display the message Hello, World. When you execute the mcc command to link files and libraries, mcc actually calls the mbuild script to perform the functions.