Main Content

Deploy to .NET Applications Using MWArray API

Integrate packaged MATLAB® functions into .NET applications using the MWArray API for data exchange

With MATLAB Compiler SDK™, integrating compiled MATLAB functions into a .NET application involves using a combination of APIs that initialize MATLAB Runtime, load the compiled MATLAB functions into MATLAB Runtime, and manage the data that passes between the .NET code and MATLAB.

The two data conversion APIs that marshal and format data between .NET and MATLAB are MWArray, which uses derived types that map to MATLAB data types, and the native .NET API, which uses native .NET types and supports .NET remoting. In addition, type-safe interfaces provide an alternate set of methods that work directly with native .NET data types.

To integrate MATLAB functions with servers developed in .NET, use either the .NET remoting API or the Windows Communications Foundation framework from Microsoft®. These APIs facilitate the development of distributed applications with features for deploying active figures over the web and accessing .NET remoting capabilities.

Functions

compiler.build.dotNETAssemblyCreate .NET assembly for deployment outside MATLAB (Since R2021a)
compiler.build.DotNETAssemblyOptionsOptions for building .NET assemblies (Since R2021a)
compiler.package.installerCreate an installer for files generated by MATLAB Compiler (Since R2020a)
compiler.package.InstallerOptionsOptions for creating MATLAB Compiler package installers (Since R2020a)
enableTSUtilsfromNetworkDriveSet trust setting to load .NET assemblies from network drive
ntswrapGenerate type-safe API

MWArray Class Library Reference

Topics

Requirements

Create and Integrate with .NET Framework

Create and Integrate with .NET 6.0

Sample Applications

Data Conversion

Type-Safe API

.NET Remoting

Troubleshooting .NET Assemblies