This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.


Set up application state shared by all MATLAB Runtime instances created in current process


  mclInitializeApplication(const char **options, int count)


Set up the application state shared by all MATLAB® Runtime instances created in current process. Call only once per process. The function takes an array of strings (possibly of zero length) and a count containing the size of the string array. The string array may contain the following MATLAB command line switches, which have the same meaning as they do when used in MATLAB:

  • -appendlogfile

  • -Automation

  • -beginfile

  • -debug

  • -defer

  • -display

  • -Embedding

  • -endfile

  • -fork

  • -java

  • -jdb

  • -logfile

  • -minimize

  • -MLAutomation

  • -nodisplay

  • -noFigureWindows

  • -nojvm

  • -noshelldde

  • -nosplash

  • -r

  • -Regserver

  • -shelldde

  • -singleCompThread

  • -student

  • -Unregserver

  • -useJavaFigures

  • -mwvisual

  • -xrm


mclInitializeApplication must be called once only per process. Calling mclInitializeApplication more than once may cause your application to exhibit unpredictable or undesirable behavior.


When running on Mac, if -nodisplay is used as one of the options included in mclInitializeApplication, then the call to mclInitializeApplication must occur before calling mclRunMain.


To start all MATLAB Runtime in a given process with the -nodisplay option, for example, use the following code:

const char *args[] = { "-nodisplay" }; 
if (! mclInitializeApplication(args, 1))
           "An error occurred while initializing: \n %s ",
   return -1;  

Introduced in R2009a