Main Content

MATLAB Function Block Editor

Edit MATLAB® Function block code, define data arguments, input triggers, and function-call outputs for a MATLAB Function block

Customize, edit and debug MATLAB Function block code.

Objects

MATLABFunctionConfigurationMATLAB Function block property configuration
MATLABFunctionReportMATLAB function report

Functions

openReportOpen MATLAB function report
closeReportClose MATLAB function report
getReportGenerate MATLAB function report

Topics

Adding Data to a MATLAB Function Block

Define data arguments for MATLAB Function blocks.

Adding Input Triggers to a MATLAB Function Block

An input trigger is an event on the input port that causes the MATLAB Function block to execute.

Adding Function Call Outputs to a MATLAB Function Block

A function call output is an event on the output port of a MATLAB Function block that causes a Function-Call Subsystem block in the Simulink® model to execute.

Ports and Data Manager

Use the Ports and Data Manager to define data arguments, input triggers, and function-call outputs for a MATLAB Function block.

MATLAB Function Block Properties

Descriptions of the properties of a MATLAB Function block.

MATLAB Function Reports

Generate and interpret MATLAB function reports.

Track Object Using MATLAB Code

Integrate MATLAB code into a Simulink model that estimates the position of an object moving in a two-dimensional space.

Filter Audio Signal Using MATLAB Code

Integrate MATLAB code into a Simulink model for a signal processing application.

Troubleshooting

Debugging a MATLAB Function Block

Debug a MATLAB Function block function during simulation and check for data range violations.