.NET Assembly Integration
MATLAB Compiler SDK™ provides two ways to deploy MATLAB functions within .NET applications:
Deploy to .NET Applications using MATLAB Data API for .NET
In this approach, you create an archive containing MATLAB functions and deploy it within a .NET application. Use the MATLAB Compiler SDK API for .NET as an interface between .NET applications and MATLAB code deployed within those applications. Use the MATLAB Data API for .NET to handle the data exchange between a .NET application and deployed MATLAB code. All .NET applications created using MATLAB Compiler SDK API for .NET and MATLAB Data API for .NET can be built on Windows® and executed on Linux® and macOS as long as you are using .NET 5.0 or higher. This approach was introduced in R2022b.
MathWorks® recommends using the MATLAB Data API for .NET with .NET 5.0 or higher to deploy MATLAB functions across the broadest array of platforms.
Deploy to .NET Applications using MWArray API
In this approach, you create a .NET assembly consisting of a managed class that encapsulates the MATLAB functions you want to deploy. To access functionality provided by the deployed MATLAB functions, instantiate the managed class from the assembly in your C# code, and call the methods that encapsulate the MATLAB functions. Use the
MWArray
API to handle the data exchange between a .NET application and deployed MATLAB code.
Categories
- Deploy to .NET Applications Using MATLAB Data API for .NET
Integrate packaged MATLAB functions into .NET applications using the MATLAB Data API for data exchange
- Deploy to .NET Applications Using MWArray API
Integrate packaged MATLAB functions into .NET applications using the MWArray API for data exchange