Main Content

User-Defined Functions

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

Use blocks from theUser-Defined Functionslibrary 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金宝app
C Function Integrate and call external C code from a Simulink model
Function Caller Call Simulink or exported Stateflow function
Initialize Function Executes contents on a model initialize 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
Reset Function Executes contents on a model reset event
S-Function Include S-function in model
S-Function Builder Integrate C or C++ code to create S-functions
金宝app仿真软件的功能 Function defined with Simulink blocks
Terminate Function Execute contents on a model terminate event