coder.mapping.utils.create

Create code mappings object for configuring data and function interface for C code generation

    Description

    example

    myCodeMappingObj = coder.mapping.utils.create(model) creates C code mappings environment for the specified model and returns the mappings as object myCodeMappingObj. Code mappings associate model data elements and functions with configurations for C code generation. If code mappings exist for the specified model, the function returns those code mappings.

    Examples

    collapse all

    For model myConfigModel, create C code mappings by calling coder.mapping.utils.create. Then, get the code mappings with a call to coder.mapping.api.get.

    myCodeMappingObj = coder.mapping.utils.create('myConfigModel');
    myCodeMappingObj = coder.mapping.api.get('myConfigModel');

    Input Arguments

    collapse all

    Model file for which to create and return a code mappings object, specified as a handle or a character vector or string scalar representing the model name. The model must be loaded (for example, by using load_system) or open. Omit the .slx file extension.

    Example: 'myConfigModel'

    Data Types: char | string | model_handle

    Output Arguments

    collapse all

    The model code mappings, returned as a CodeMapping object.

    Introduced in R2020b