Call MATLAB Function
- Updated2026-07-27
- 2 minute(s) read
Calls the top level MATLAB(R) function from a source file.
The Call MATLAB Function is expandable and shows data types for the wired inputs and outputs. You can configure the Call MATLAB Function to specify the MATLAB session, source path, and function name.
The Call MATLAB Function is not supported on real-time or FPGA targets.

Inputs/Outputs
session in
—
session in specifies a reference to the MATLAB session.
source file path
—
source file path specifies the absolute path to the source .m file.
error in (no error)
—
return type
—
input parameter
—
session out
—
session out returns a reference to the MATLAB session.
error out
—
return value
—
—
|
Supported Data Types
The Call MATLAB Function supports the following data types:
- Numerics
- Arrays, including multi-dimensional arrays. Note 1D arrays are converted to Row Vectors in MATLAB.
- Strings
- Clusters
- Booleans
session in
—
source file path
—
error in (no error)
—
return type
—
session out
—
error out
—
return value
—