Hauptinhalt

Die Übersetzung dieser Seite ist veraltet. Klicken Sie hier, um die neueste Version auf Englisch zu sehen.

User-Defined Functions

R2026a
Benutzerdefinierte Funktionsblöcke wie MATLAB Function, MATLAB System, Simulink Function und Initialize Function

Verwenden Sie Blöcke aus der Bibliothek „User-Defined Function“, um die Simulink®-Modellierungsfunktionen zu erweitern, indem Sie neue Arten von Blöcken erstellen. Sie können Blockalgorithmen mithilfe von MATLAB®, C/C++ und Fortran® Code implementieren.

Blöcke

C Caller blockC CallerIntegrate C code in Simulink
C Function blockC FunctionIntegrate and call external C/C++ code from a Simulink model
Fcn blockFcnApply specified expression to input
Function Caller blockFunction CallerCall a Simulink function
Initialize Function blockInitialize FunctionExecute subsystem on model initialize event
Interpreted MATLAB Function blockInterpreted MATLAB Function(To be removed) Apply MATLAB function or expression to input
Level-2 MATLAB S-Function blockLevel-2 MATLAB S-FunctionVerwenden einer Level-2 MATLAB S-function im Modell
MATLAB Function block icon.MATLAB FunctionInclude MATLAB code in Simulink models
MATLAB System blockMATLAB SystemInclude System object in model
Python Code blockPython CodeIntegrate native Python code into a Simulink model (Seit R2025a)
Reinitialize Function block iconReinitialize FunctionExecute subsystem on model or subsystem reinitialize event (Seit R2022a)
Reset Function blockReset FunctionExecute subsystem on model reset event
S-Function blockS-FunctionS-Funktion in Modell einbeziehen
S-Function Builder blockS-Function BuilderIntegrieren von C oder C++ Code zum Erstellen von S-Functions
Simulink Function blockSimulink FunctionDefine a function using Simulink blocks
Terminate Function blockTerminate FunctionExecute subsystem on model terminate event