Specify Code Configuration Parameters Interactively - MATLAB & Simulink (original) (raw)

Main Content

You can control many aspects of the code generation process interactively by using the Code Generation Settings dialog box. You can use this dialog box both from the command line and from the MATLAB® Coder™ app. When you generate code at the command line by using the codegen command with a configuration object, you can also modify the properties of the configuration object directly by using dot notation. See Specify Build Configuration Parameters at the Command Line Using Configuration Objects.

Open and Use the Code Generation Settings Dialog Box

You can access the Code Generation Settings dialog box from the command line or from the MATLAB Coder app. Certain app-specific parameters are only available if you open the dialog box from the app.

Using the MATLAB Coder App

To open the Code Generation Settings dialog box for your code generation project, click Settings > View all settings on the MATLAB Coder tab of the toolstrip. The parameters that you see in the Code Generation Settings Dialog box depend on whether you generate standalone code or a MEX function, as well as on the setting of the Use Embedded Coder features parameter.

At the Command Line

When you generate code at the command line, you must first create a code configuration object by using the coder.config function. The parameters that you see in the Code Generation Settings Dialog box depend on the type of code configuration object that you create. For example, create a coder.MexCodeConfig object named mexcfg:

mexcfg = coder.config("mex");

To open the Code Generation Settings dialog box for this config object, use one of these approaches:

Edit Configuration Object

Additional Functionalities in the Code Generation Settings Dialog Box

To enable you to easily modify code configuration parameters interactively, the Code Generation Settings dialog box provides these functionalities:

See Also

coder.config | coder.MexCodeConfig | coder.CodeConfig | coder.EmbeddedCodeConfig | coder.DeepLearningCodeConfig | coder.mexconfig (Fixed-Point Designer)

Topics