Model Configuration Parameters: Code Generation Data Type Replacement - MATLAB & Simulink (original) (raw)

Main Content

The > category includes parameters for replacing built-in data type names with user-defined names in the generated code. On the Configuration Parameters dialog box, the following configuration parameters are on the > pane.

These parameters belong to the Advanced parameters category.

To programmatically replace the Simulink Coderâ„¢ data type names for your model, adjust theReplacementTypes model parameter, which is a structure. This example code shows how to modify the ReplacementTypes parameter to replace the built-in data type names int8,uint8, and boolean with the custom data type names my_T_S8, my_T_U8, andmy_T_BOOL.

model = bdroot; cs = getActiveConfigSet(model); set_param(cs,'EnableUserReplacementTypes','on');

struc = get_param(cs,'ReplacementTypes'); struc.int8 = 'my_T_S8'; struc.uint8 = 'my_T_U8'; struc.boolean = 'my_T_BOOL';

set_param(cs,'ReplacementTypes',struc);

See Also

Topics