Interfaces for MATLAB®
- Updated2023-02-17
- 1 minute(s) read
Interfaces for MATLAB
An Interface for MATLAB (.mli) is a document in which you define calls to a MATLAB file (.m or .mlx) in your G dataflow application.
MATLAB files can be either functions or scripts. NI recommends that you format MATLAB programs into functions because functions perform better than scripts and offer a clean programming model.
In an Interface for MATLAB, you create interface nodes that map to arguments in a MATLAB function or variables in a MATLAB script. Visual representations of interface nodes appear on the palette on the diagram. You can place and wire interface nodes in your application.
When you execute the application, the Interface for MATLAB invokes MATLAB, which calls the MATLAB file. Input data passes from the diagram to MATLAB, and data returns from MATLAB to the diagram.
The Interface for MATLAB supports Windows targets only.
Examples
Search within the programming environment to access the following installed examples:
- Interface for MATLAB Fundamentals
- Interface for MATLAB Working with nD Arrays
- Interface for MATLAB Working with Structures
- MATLAB User Defined Function
- MATLAB Monte Carlo Calculation
- Prime Number Calculation
MATLAB® is a registered trademark of The MathWorks, Inc.
In This Section
Related Information
- Calling MATLAB Functions and Scripts
Create an Interface for MATLAB to define calls to a MATLAB function or script.
- Debugging MATLAB Functions and Scripts
You can debug MATLAB functions and scripts when you use an Interface for MATLAB to call them in your G dataflow application.
- Migrating from MathScript Node to Interface for MATLAB
Use an Interface for MATLAB to migrate source code that contains a MathScript Node.