Main Content

Call MATLAB from .NET

Write .NET programs that work with MATLAB®

MATLAB Engine API for .NET provides an interface between .NET programming languages and MATLAB. This API enables programs to launch MATLAB, evaluate MATLAB functions with arguments, and exchange data between MATLAB and .NET programs.

To access .NET libraries directly from MATLAB instead, see Call .NET from MATLAB.

If you need to maintain existing .NET programs created for MATLAB R2022a or earlier that work with the Microsoft® Component Object Model (COM), see Write COM Applications to Work with MATLAB.

Funktionen

alle erweitern

matlab.engine.shareEngineConvert running MATLAB session to shared session
matlab.engine.engineNameReturn name of shared MATLAB session
matlab.engine.isEngineSharedDetermine if MATLAB session is shared
matlab.engine.typedinterface.generateCSharpGenerate C# code interface for MATLAB namespaces, classes, and functions (Seit R2023b)

Klassen

alle erweitern

MathWorks.MATLAB.Engine.MATLABEngine .NET class using MATLAB as a computational engine (Seit R2022b)
MathWorks.MATLAB.Types.MATLABArray.NET class to represent pointers to MATLAB arrays (Seit R2022b)
MathWorks.MATLAB.Types.MATLABObject.NET class to represent scalar instances of MATLAB classes (Seit R2022b)
MathWorks.MATLAB.Types.MATLABStruct.NET class to represent scalar MATLAB structures (Seit R2023a)
MathWorks.MATLAB.Types.MATLABWorkspace.NET class to manage interactions with MATLAB base workspace variables (Seit R2022b)
MathWorks.MATLAB.Types.RunOptions.NET class to specify options for MATLAB function evaluation (Seit R2022b)
MathWorks.MATLAB.Types.MATLABProvider.NET base class for invoking MATLAB functions (Seit R2023b)

Themen

Set Up and Build Engine Applications

Start MATLAB from .NET Application

Call MATLAB Functions from .NET

Fehlersuche

MathWorks.MATLAB.Exceptions Exception Classes for .NET

The MathWorks.MATLAB.Exceptions namespace contains the exception classes for the .NET engine.

Verwandte Informationen