Main Content

Block Creation Basics

Principles of extending block functionality of Simulink®through new block development

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

Existing code can be any code that provides the kind of functionality not available through Simulink library blocks. You can integrate MATLAB®, C/C++, and Fortran code. You can also integrate System object™.

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.

Blocks

Function Caller Call Simulink or exported Stateflow function
Interpreted MATLAB Function ApplyMATLABfunction or expression to input
Level-2 MATLAB S-Function Use Level-2 MATLAB S-function in model
MATLAB Function IncludeMATLABcode in models that generate embeddable C code
MATLAB System IncludeSystem objectin model
S-Function Include S-function in model
S-Function Builder Integrate C or C++ code to create S-functions
金宝app仿真软件的功能 Graphically define a function with Simulink blocks

Topics