Main Content

Add and Implement Propagation Methods

When to Use Propagation Methods

Propagation methods define output specifications. Use them when the output specifications cannot be inferred directly from the inputs during Simulink® model compilation.

Consider using propagation methods in your System object™ when:

  • The System object requires access to all MATLAB® functions that do not support code generation, which means that you cannot generate code for simulation. You must use propagation methods in this case and the interpreted execution mode for simulation. Code generation modes will not be supported.

  • You want to use variable-size signals.

  • You do not care whether code is generated, but you want to improve startup performance. Use propagation methods to specify information for the inputs and outputs, enabling quicker startup time.

At startup, the Simulink software tries to evaluate the input and output ports of the model blocks for signal attribute propagation. In the case of MATLAB System blocks, if the software cannot perform this evaluation, it displays a message prompting you to add propagation methods to the System object.

Implement Propagation Methods

Simulink evaluates the uses of the propagation methods to evaluate the input and output ports of the MATLAB System block for startup.

Each method has a default implementation, listed in the Default Implementation Should Suffice if column. If your System object does not use the default implementation, you must implement a version of the propagation method for your System object.

DescriptionPropagation MethodDefault Implementation Should Suffice if Example

Gets dimensions of output ports. The associated method is getOutputSize.


  • Only one input

  • Only one output

  • An input size that is the same as the output size

Gets data types of output ports. The associated method is getOutputDataType.


  • Only one input

  • Only one output

  • Output data type always the same as the input data type

Indicates whether output ports are complex or not. The associated method is isOutputComplex.


  • Only one input

  • Only one output

  • Output complexity always the same as th input complexity

Whether output ports are fixed size. The associated method is isOutputFixedSize.


  • Only one input

  • Only one output

  • Output and input are fixed-size

Related Topics