Main Content

removeSignal

Remove block output signal from model code mappings

Since R2020b

    Description

    example

    removeSignal(myCodeMappingObj,portHandle) removes signals specified by the block output port handles from the specified model code mappings.

    This function does not apply to signals that originate from root-level Inport blocks.

    Examples

    collapse all

    From the model code mappings for model myConfigModel, remove the output signals of lookup table blocks Table1D and Table2D. After creating the object cm by calling function coder.mapping.api.get, get handles to the output ports for lookup table blocks. Remove the output signals from the code mappings by calling removeSignal.

    cm = coder.mapping.api.get('myConfigModel');
    lut1D_ports = get_param('myConfigModel/Table1D','PortHandles');
    lut2D_ports = get_param('myConfigModel/Table2D','PortHandles');
    lut1D_outPort = lut1D_ports.Outport;
    lut2D_outPort = lut2D_ports.Outport;
    removeSignal(cm,[lut1D_outPort,lut2D_outPort]);
    

    Input Arguments

    collapse all

    Code mapping object (model code mappings) returned by a call to function coder.mapping.api.get.

    Example: myCM

    Signal to remove from the code mappings, specified as a handle of an output port of the source block of the signal. To specify multiple port handles, use a cell array.

    Example: portHandle

    Data Types: port_handle | cell

    Version History

    Introduced in R2020b