Main Content

Simulink.SFunctionBuilder.delete

Remove input, output, parameter, library item, or state from S-Function Builder block

    Description

    Simulink.SFunctionBuilder.delete(blk,elem,Name=name) deletes the item item with the specified name name from the S-Function Builder block blk. Use this syntax to delete input ports, output ports, and parameters.

    Simulink.SFunctionBuilder.delete(blk,elem,Index=ind) deletes the item item at the specified index ind from the S-Function Builder block blk. Use this syntax to delete library items, discrete states, and continuous states.

    Input Arguments

    collapse all

    S-Function Builder block, specified as a block handle or as a string or a character vector that defines the block path.

    Tips

    • To get the block handle for a block in your model, use the getSimulinkBlockHandle function.

    • To get the block handle for the most recently selected or added block, use the gcbh function.

    Type of element to delete, specified as one of these options:

    • 'Input'

    • 'Output'

    • 'Parameter'

    • 'LibraryItem'

    • 'DiscreteState'

    • 'ContinuousState'

    Tips

    The way to specify which element to delete depends on the type of element you want to delete.

    • To specify which input port, output port, or parameter to delete, specify the Name name-value argument.

    • To specify which library item, discrete state, or continuous state to delete, specify the Index name-value argument.

    Data Types: char | string

    Name of input port, output port, or parameter to delete, specified as a string or a character vector.

    Example: Name="in1"

    Data Types: char | string

    Index of library item, discrete state, or continuous state to delete, specified as a scalar.

    Example: Index=1

    Data Types: single | double | int8 | int16 | int32 | int64 | uint8 | uint16 | uint32 | uint64 | logical

    Version History

    Introduced in R2022a