Main Content

Block Authoring Basics

Principles of extending modeling functionality of Simulink® by authoring blocks

Simulink allows you to extend the built-in modeling functionality by creating your own blocks.

Create a new Simulink block for your needs if the built-in library does not provide a suitable block. You can create new functionality using a MATLAB® function rather than a Simulink block diagram.


Function CallerCall Simulink or exported Stateflow function
Level-2 MATLAB S-FunctionUse Level-2 MATLAB S-function in model
MATLAB FunctionInclude MATLAB code in Simulink models
MATLAB SystemInclude System object in model
S-FunctionInclude S-function in model
S-Function BuilderIntegrate C or C++ code to create S-functions
Simulink FunctionGraphically define a function with Simulink blocks
FcnApply specified expression to input