.net assembly integration -凯发k8网页登录
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.
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.
matlab runtime must be installed and setup on the machine running the .net application.
since matlab compiler sdk provides two .net apis to interact with deployed matlab functions, the two apis are distinguished based on the apis used for exchanging data between the .net application and the deployed matlab functions.
mathworks® recommends using the matlab compiler sdk api for .net with the matlab data api for .net. and microsoft®.net 5.0 or higher to deploy matlab functions across the broadest array of platforms.
categories
integrate packaged matlab functions into .net applications using the matlab data api for data exchange
integrate packaged matlab functions into .net applications using the mwarray api for data exchange