# mcc

Compile MATLAB functions for deployment

## Syntax

## Description

### Other `mcc`

Topics

This topic describes `mcc`

options for use
with MATLAB^{®}
Compiler SDK™ for MATLAB
Production Server™. For information on compiling:

### General Usage

`mcc `

compiles the functions as specified by the options. The options used depend on
the intended results of the compilation.`options`

`mfilename1 mfilename2 ... mfilenameN`

`mcc('`

compiles the function as specified by the options. Specify filenames, options,
and option parameters in single quotes.`options`

','`mfilename`

')

### Deployable Archive for MATLAB Production Server

`mcc -W CTF:`

instructs the compiler to create a deployable archive (* archive_name* -U

`options`

`mfilename1 mfilename2 ... mfilenameN`

`.ctf`

file) for use with a MATLAB
Production Server instance.The syntax also creates the server-side deployable archive
(`.ctf`

file) for Microsoft^{®}
Excel add-ins.

### Excel Add-In for MATLAB Production Server

`mcc -W mpsxl:`

creates a client-side Microsoft
Excel add-in from the
specified files that can be used to send requests to MATLAB
Production Server from Excel. Creating the client-side add-in * addin_name*,

*,*

`className`

`version`

`input_marshaling_flags`

*-T link:lib*

`output_marshaling_flags`

`options`

`mfilename1 mfilename2 ... mfilenameN`

*must*be preceded by creating a server-side deployable archive (

`.ctf`

file) from the specified files. A purely client side add-in is not viable. — Specifies the name of the add-in.`addin_name`

— Specifies the name of the class to be created. If you do not specify the class name,`className`

`mcc`

uses theas the default.`addin_name`

— Specifies the version of the add-in specified as`version`

.`major`

.`minor`

— Specifies the major version number. If you do not specify a version number,`major`

`mcc`

uses the latest version.— Specifies the minor version number. If you do not specify a version number,`minor`

`mcc`

uses the latest version.

— Specifies options for how data is marshaled between Microsoft Excel and MATLAB.`input_marshaling_flags`

`-replaceBlankWithNaN`

— Specifies that a blank in Microsoft Excel is mashaled into NaN in MATLAB. If you do not specify this flag, blanks are marshaled into 0.`-convertDateToString`

— Specifies that dates in Microsoft Excel are marshaled into MATLAB character vectors. If you do not specify this flag, dates are marshaled into MATLAB doubles.

— Specifies options for how data is marshaled between MATLAB and Microsoft Excel.`output_marshaling_flags`

`-replaceNaNWithZero`

— Specifies that NaN in MATLAB is marshaled into a 0 in Microsoft Excel. If you do not specify this flag, NaN is marshalled into`#QNAN`

in Visual Basic^{®}.`-convertNumericToDate`

— Specifies that MATLAB numeric values are marshaled into Microsoft Excel dates. If you do not specify this flag, Microsoft Excel does not receive dates as output.

## Examples

### Create a standalone application and include MATLAB preferences

`mcc -m helloWorld.m -a C:\Users\someuser\AppData\Roaming\MathWorks\MATLAB\R2022b\matlab.mlsettings`

### Create a deployable archive for MATLAB Production Server

mcc -W CTF:myDeployableArchive -U mymagic.m

### Create an Excel add-in for MATLAB Production Server

mcc -W 'mpsxl:myDeployableArchive,myExcelClass,version=1.0' mymagic.m