Main Content

User-Defined Functions

Custom function blocks such as MATLAB Function, MATLAB System, Simulink Function, and Initialize Function

Use blocks from the User-Defined Functions library to extend Simulink®modeling functionality by creating new types of blocks. You can implement block algorithms using MATLAB, C/C++, and Fortran code.

Blocks

C Caller Integrate C code in万博1manbetx
C Function Integrate and call external C/C++ code from a Simulink model
Function Caller Call Simulink or exported Stateflow function
Initialize Function initi执行子系统模型alize event
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
Reinitialize Function Execute subsystem on model or subsystem reinitialize event
Reset Function Execute subsystem on model reset event
S-Function Include S-function in model
S-Function Builder Integrate C or C++ code to create S-functions
万博1manbetx仿真软件的功能 Graphically define a function with Simulink blocks
Terminate Function Execute subsystem on model terminate event