text: Compile MATLAB functions for deployment
  mcc
  compiles the functions as specified by the options.
  options
  mfilename1 mfilename2...mfilenameN
  The options used depend on the intended results of the compilation. For information on compiling:
  mcc -W 'excel:
  creates a Microsoft®
  Excel add-in from the specified files.
  addin_name,
  className,version=
  version_number'
  -T link:lib
  options
  mfilename1 mfilename2...mfilenameN
  addin_name — Specifies
  the name of the addin and its namespace, which is a period-separated
  list, such as
  companyname.groupname.component.
  className — Specifies
  the name of the class to be created. If you do not specify the class
  name,
  mcc uses the
  addin_name as
  the default. If specified,
  className, needs
  to be different from
  mfilename.
  version_number — Specifies the
  version number of the add-in number,
  mcc sets
  major
  to
  0.
  minor — Specifies the minor
  version number. If you do not specify a number,
  mcc sets
  minor
  to
  0.
  bug— Specifies the bug fix
  maintenance release number. If you do not specify a number,
  mcc sets
  bug
  to
  0.
  build— Specifies the build
  number. If you do not specify a number,
  mcc sets
  build to
  0.
  Note
  Excel add-ins can be created only in MATLAB running on Windows.
  Note,version=3.4.1.5' -T link:exe mymagic.m
  mcc -W 'excel:myAddin,myClass,1.0' -T link:lib magic.m
  Create an Excel add-in in Windows with version number
  5.2.1.7.
  mcc -W 'excel:myAddin,myClass,version=5.2.1.7' -T link:lib -b.
  options— Options for customizing the output
  Options for customizing the output, specified as a list of character vectors or string scalars.
  -a
  Add files to the deployable archive using
  -a path to
  specify the files to be added. Multiple
  -a options
  are permitted.
  If a file name is specified with
  -a, the
  compiler looks for these files on the MATLAB path, so specifying
  the full path name is optional. These files are not passed to
  mbuild,
  so you can include files such as data files.
  If a folder name is specified with the
  -a option, the entire contents of
  that folder are added recursively to the deployable archive. For
  example,
  mcc -m hello.m -a ./testdir
  specifies that all files in
  testdir, as well
  as all files in its subfolders, are added to the deployable archive.
  The folder subtree in
  testdir is preserved in the
  deployable archive.
  If the filename includes a wildcard pattern, only the files in the folder that match the pattern are added to the deployable archive and subfolders of the given path are not processed recursively. For example,
  mcc -m hello.m -a ./testdir/*
  specifies that all files in
  ./testdir are
  added to the deployable archive and subfolders under
  ./testdir are
  not processed recursively.
  mcc -m hello.m -a ./testdir/*.m
  specifies that all files with the extension
  .m under
  ./testdir are
  added to the deployable archive and subfolders of
  ./testdir are
  not processed recursively.
  Note
  * is the only supported wildcard.
  When you add files to the archive using
  -a that
  do not appear on the MATLAB path at the time of compilation,, not to the user's local folder. The cache directory is
  created from the deployable archive the first time the application
  is executed. You can use the
  isdeployed (MATLAB Compiler SDK) function to determine whether the
  application is being run in deployed mode, and adjust the path
  accordingly. The
  -a option also creates a
  .auth file for authorization purposes.
  Caution
  If you use the
  -a flag to include a file
  that is not on the MATLAB path, the folder containing the file
  is added to the MATLAB dependency analysis path. As a result,
  other files from that folder might be included in the compiled application.
  Note
  If you use the
  -a flag to include custom Java classes,
  standalone applications work without any need to change the
  classpath as
  long as the Java class is not a member of a package. The same
  applies for JAR files. However, if the class being added is a member
  of a package, the MATLAB code needs to make an appropriate call
  to
  javaaddpath to update the
  classpath with
  the parent folder of the package.
  -b
  Generate a Visual Basic® file (
  .bas) containing
  the Microsoft
  Excel Formula Function interface to the COM object
  generated by MATLAB
  Compiler. When imported into the workbook Visual Basic code,
  this code allows the MATLAB function to be seen as a cell formula
  function.
  -B
  Replace the file on the
  mcc command line
  with the contents of the specified file. Use
  -B filename[:<a1>,<a2>,...,<an>]
  The bundle
  filename should contain only
  mcc command-line
  options and corresponding arguments and/or other file names. The file
  might contain other
  -B options. A bundle can include
  replacement parameters for compiler options that accept names and
  version numbers. See Using Bundles to Build MATLAB Code (MATLAB Compiler SDK).
  -c
  When used in conjunction with the
  -l option,
  suppresses compiling and linking of the generated C wrapper code.
  The
  -c option cannot be used independently of the
  -l option.
  -C
  Do not embed the deployable archive in binaries.
  Note
  The
  -C flag is ignored for Java libraries.
  -d
  Place output in a specified folder. Use
  -d outFolder
  to direct the generated files to
  outFolder.
  -f
  Override the default options file with the specified options file. It specifically applies to the C/C++ shared libraries, COM, and Excel targets. Use
  -f filename
  to specify
  filename as the options file when calling
  mbuild. This option lets you use different
  ANSI compilers for different invocations of the compiler. This
  option is a direct pass-through to
  mbuild.
  -g,
  -G
  Include debugging symbol information for the C/C++ code generated
  by MATLAB
  Compiler SDK. It also causes
  mbuild to
  pass appropriate debugging flags to the system C/C++ compiler. The
  debug option lets you backtrace up to the point where you can identify
  if the failure occurred in the initialization of MATLAB Runtime,
  the function call, or the termination routine. This option does not
  let you debug your MATLAB files with a C/C++ debugger.
  -I
  Add a new folder path to the list of included folders. Each
  -I option
  appends the folder to the end of the list of paths to search. For
  example,
  -I <directory1> -I <directory2>
  sets up the search path so that
  directory1 is
  searched first for MATLAB files, followed by
  directory2.
  This option is important for standalone compilation where the MATLAB path
  is not available.
  If used in conjunction with the
  -N option,
  the
  -I option adds the folder to the compilation
  path in the same position where it appeared in the MATLAB path
  rather than at the head of the path.
  -K
  Direct
  mcc to not delete output files if the compilation ends prematurely
  due to error.
  The default behavior of
  mcc is to dispose
  of any partial output if the command fails to execute successfully.
  -m
  Direct
  mcc to generate a standalone application.
  -M
  Define compile-time options. Use
  -M string
  to pass
  string directly to
  mbuild. This option provides
  a useful mechanism for defining compile-time options, for example,
  -M "-Dmacro=value".
  Note
  Multiple
  -M options do not accumulate; only
  the rightmost
  -M option is used.
  -n
  The
  -n option automatically identifies numeric
  command line inputs and treats them as MATLAB doubles.
  -N
  Passing
  -N clears the path of all folders
  except the following core folders (this list is subject to change
  over time):
  matlabroot\toolbox\matlab
  matlabroot\toolbox\local
  matlabroot\toolbox\compiler
  matlabroot\toolbox\shared\bigdata
  Passing
  -N also retains all subfolders in
  this list that appear on the MATLAB path at compile time. Including
  -N on
  the command line lets you replace folders from the original path,
  while retaining the relative ordering of the included folders. All
  subfolders of the included folders that appear on the original path
  are also included. In addition, the
  -N option retains
  all folders that you included on the path that are not under
  .
  matlabroot\toolbox
  When using the
  –N option, use the
  –I option
  to force inclusion of a folder, which is placed at the head of the
  compilation path. Use the
  –p option to conditionally
  include folders and their subfolders; if they are present in the MATLAB path,
  they appear in the compilation path in the same order.
  -o
  Specify the name of the final executable (standalone applications only). Use
  -o outputfile
  to name the final executable output of MATLAB
  Compiler. A suitable platform-dependent extension is added to
  the specified name (for example,
  .exe for
  Windows standalone applications).
  -p
  Use in conjunction with the option
  -N to
  add specific folders and subfolders under
  to
  the compilation MATLAB path. The files are added in the same
  order in which they appear in the MATLAB path. Use the syntax
  matlabroot\toolbox
  -N -p directory
  where
  directory is the folder to be included.
  If
  directory is not an absolute path, it is assumed
  to be under the current working folder.
  If a folder is included with
  -p that
  is on the original MATLAB path, the folder and all its subfolders
  that appear on the original path are added to the compilation path
  in the same order.
  If a folder is included with
  -p that
  is not on the original MATLAB path, that folder is ignored. (You
  can use
  -I to force its inclusion.)
  -r
  Embed resource icon in binary.
  -R
  Provide MATLAB Runtime options. This option is relevant only when building standalone applications using MATLAB Compiler. The syntax is as follows:
  -R option
  Caution
  When running on Mac OS X, if you use
  -nodisplay as
  one of the options included in
  mclInitializeApplication,
  then the call to
  mclInitializeApplication must
  occur before calling
  mclRunMain.
  Note
  If you specify the
  -R option for libraries
  created from MATLAB
  Compiler SDK,
  mcc still compiles without errors and
  generates the results. But the
  -R option
  doesn't apply to these libraries and does not do
  anything.
  -S
  The standard behavior for the MATLAB Runtime is that every instance of a class gets its own MATLAB Runtime context. The context includes a global MATLAB workspace for variables, such as the path and a base workspace for each function in the class. If multiple instances of a class are created, each instance gets an independent context. This ensures that changes made to the global or base workspace in one instance of the class does not affect other instances of the same class.
  In a singleton MATLAB Runtime, all instances of a class share the context. If
  multiple instances of a class are created, they use the context
  created by the first instance which saves startup time and some
  resources. However, any changes made to the global workspace or the
  base workspace by one instance impacts all class instances. For
  example, if
  instance1 creates a global variable
  A in a singleton MATLAB Runtime, then
  instance2 can use variable
  A.
  Singleton MATLAB Runtime is only supported by the following products on these specific targets:
  -T
  Specify the output target phase and type.
  Use the syntax
  -T to
  define the output type.
  target
  -u
  Register COM component for the current user only on the development machine. The argument applies only to the generic COM component and Microsoft Excel add-in targets.
  -U
  Build deployable archive (
  .ctf file) for
  MATLAB
  Production Server.
  -v
  Display the compilation steps, including:
  MATLAB Compiler version number
  The source file names as they are processed
  The names of the generated output files as they are created
  The invocation of
  mbuild
  The
  -v option passes the
  -v option
  to
  mbuild and displays information about
  mbuild.
  -w
  Display warning messages. Use the syntax
  -w option [:<msg>]
  to control the display of warnings.
  You can also turn warnings on or off in your MATLAB code.
  For example, to turn off warnings for deployed applications (specified using
  isdeployed) in
  startup.m,
  you
  write:
  if isdeployed warning off end
  To turn on warnings for deployed applications, you write:
  if isdeployed warning on end
  You can also specify multiple
  -w
  options.
  For example, if you want to disable all warnings except
  repeated_file, you
  write:
  -w disable -w enable:repeated_file
  -woptions, they are processed from left to right.
  -W
  Control the generation of function wrappers. Use the syntax
  -W type
  to control the generation of function wrappers for a collection of MATLAB files generated by the compiler. You provide a list of functions, and the compiler generates the wrapper functions and any appropriate global variable definitions.
  -X
  Use
  -X to ignore data files read by common
  MATLAB file I/O functions during dependency analysis. For a
  list of MATLAB file I/O functions whose data files are ignored when
  you use the
  -X option, see App Packaging Dependency Analysis. For details on how to
  use
  -X option, see
  %#exclude.
  -Y
  Use
  -Y license.lic
  to override the default license file with the specified argument.
  Note
  The
  -Y flag works only with the
  command-line mode.
  >>!mcc -m foo.m -Y license.lic
  On Windows, you can generate a system-level file version number for your
  target file by appending
  version=
  version_number to the
  target generating
  mcc syntax. For an example, see Create a standalone application with a system-level file version number (Windows only).
  version_number — Specifies the version of the
  target version number,
  mcc sets
  major
  to
  1.
  minor — Specifies the minor version
  number. If you do not specify a version number,
  mcc sets
  minor
  to
  0.
  bug — Specifies the bug fix maintenance
  release number. If you do not specify a version number,
  mcc sets
  bug to
  0.
  build — Specifies build number. If you
  do not specify a version number,
  mcc sets
  build to
  0.
  This functionality is supported for standalone applications and Excel add-ins in MATLAB
  Compiler. For supported targets in MATLAB
  Compiler SDK, see the Tips section in
  mcc (MATLAB Compiler SDK).