Documentation

Block Creation Basics

Create custom blocks to extend modeling functionality

Custom blocks expand the modeling functionality provided with Simulink®. Use a custom block to:

  • Model behaviors that are not provided with a Simulink built-in solution.

  • Build more advanced models.

  • Encapsulate model components into a library block that you can copy into multiple models.

  • Provide custom user interfaces or analysis routines.

For some ideas for how to use custom blocks, see Custom Block Examples.

Blocks

Fcn Apply specified expression to input
Function Caller Call Simulink or Stateflow function
Interpreted MATLAB Function Apply MATLAB function or expression to input
Level-2 MATLAB S-Function Use Level-2 MATLAB S-function in model
MATLAB Function Include MATLAB code in models that generate embeddable C code
MATLAB System Include System object in model
S-Function Include S-function in model
S-Function Builder Create S-function from C code that you provide
Simulink Function Function definition used by Function Caller block or Stateflow chart
Was this topic helpful?